/*
Navicat SQL Server Data Transfer

Source Server         : SQLServer
Source Server Version : 100000
Source Host           : 127.0.01:1433
Source Database       : ruoyi
Source Schema         : dbo

Target Server Type    : SQL Server
Target Server Version : 100000
File Encoding         : 65001

Date: 2018-09-10 11:41:06
*/


-- ----------------------------
-- Table structure for [dbo].[qrtz_blob_triggers]
-- ----------------------------
DROP TABLE [dbo].[qrtz_blob_triggers]
GO
CREATE TABLE [dbo].[qrtz_blob_triggers] (
[sched_name] varchar(120) NOT NULL DEFAULT '' ,
[trigger_name] varchar(200) NOT NULL DEFAULT '' ,
[trigger_group] varchar(200) NOT NULL DEFAULT '' ,
[blob_data] varbinary(MAX) NULL 
)


GO

-- ----------------------------
-- Records of qrtz_blob_triggers
-- ----------------------------

-- ----------------------------
-- Table structure for [dbo].[qrtz_calendars]
-- ----------------------------
DROP TABLE [dbo].[qrtz_calendars]
GO
CREATE TABLE [dbo].[qrtz_calendars] (
[sched_name] varchar(120) NOT NULL DEFAULT '' ,
[calendar_name] varchar(200) NOT NULL DEFAULT '' ,
[calendar] varbinary(MAX) NOT NULL 
)


GO

-- ----------------------------
-- Records of qrtz_calendars
-- ----------------------------

-- ----------------------------
-- Table structure for [dbo].[qrtz_cron_triggers]
-- ----------------------------
DROP TABLE [dbo].[qrtz_cron_triggers]
GO
CREATE TABLE [dbo].[qrtz_cron_triggers] (
[sched_name] varchar(120) NOT NULL DEFAULT '' ,
[trigger_name] varchar(200) NOT NULL DEFAULT '' ,
[trigger_group] varchar(200) NOT NULL DEFAULT '' ,
[cron_expression] varchar(200) NOT NULL DEFAULT '' ,
[time_zone_id] varchar(80) NULL DEFAULT '' 
)


GO

-- ----------------------------
-- Records of qrtz_cron_triggers
-- ----------------------------
INSERT INTO [dbo].[qrtz_cron_triggers] ([sched_name], [trigger_name], [trigger_group], [cron_expression], [time_zone_id]) VALUES (N'RuoyiScheduler', N'__TASK_CLASS_NAME__1', N'DEFAULT', N'0/10 * * * * ?', N'Asia/Shanghai');
GO
INSERT INTO [dbo].[qrtz_cron_triggers] ([sched_name], [trigger_name], [trigger_group], [cron_expression], [time_zone_id]) VALUES (N'RuoyiScheduler', N'__TASK_CLASS_NAME__2', N'DEFAULT', N'0/20 * * * * ?', N'Asia/Shanghai');
GO

-- ----------------------------
-- Table structure for [dbo].[qrtz_fired_triggers]
-- ----------------------------
DROP TABLE [dbo].[qrtz_fired_triggers]
GO
CREATE TABLE [dbo].[qrtz_fired_triggers] (
[sched_name] varchar(120) NOT NULL DEFAULT '' ,
[entry_id] varchar(95) NOT NULL DEFAULT '' ,
[trigger_name] varchar(200) NOT NULL DEFAULT '' ,
[trigger_group] varchar(200) NOT NULL DEFAULT '' ,
[instance_name] varchar(200) NOT NULL DEFAULT '' ,
[fired_time] bigint NOT NULL DEFAULT ((0)) ,
[sched_time] bigint NOT NULL DEFAULT ((0)) ,
[priority] bigint NOT NULL DEFAULT ((0)) ,
[state] varchar(50) NOT NULL DEFAULT '' ,
[job_name] varchar(200) NULL DEFAULT '' ,
[job_group] varchar(200) NULL DEFAULT '' ,
[is_nonconcurrent] varchar(50) NULL DEFAULT '' ,
[requests_recovery] varchar(50) NULL DEFAULT '' 
)


GO

-- ----------------------------
-- Records of qrtz_fired_triggers
-- ----------------------------

-- ----------------------------
-- Table structure for [dbo].[qrtz_job_details]
-- ----------------------------
DROP TABLE [dbo].[qrtz_job_details]
GO
CREATE TABLE [dbo].[qrtz_job_details] (
[sched_name] varchar(120) NOT NULL DEFAULT '' ,
[job_name] varchar(200) NOT NULL DEFAULT '' ,
[job_group] varchar(200) NOT NULL DEFAULT '' ,
[description] varchar(250) NULL DEFAULT '' ,
[job_class_name] varchar(250) NOT NULL DEFAULT '' ,
[is_durable] varchar(50) NOT NULL DEFAULT '' ,
[is_nonconcurrent] varchar(50) NOT NULL DEFAULT '' ,
[is_update_data] varchar(50) NOT NULL DEFAULT '' ,
[requests_recovery] varchar(50) NOT NULL DEFAULT '' ,
[job_data] varbinary(MAX) NULL 
)


GO

-- ----------------------------
-- Records of qrtz_job_details
-- ----------------------------
INSERT INTO [dbo].[qrtz_job_details] ([sched_name], [job_name], [job_group], [description], [job_class_name], [is_durable], [is_nonconcurrent], [is_update_data], [requests_recovery], [job_data]) VALUES (N'RuoyiScheduler', N'__TASK_CLASS_NAME__1', N'DEFAULT', null, N'com.ruoyi.project.monitor.job.util.ScheduleJob', N'0', N'0', N'0', N'0', 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000017400135F5F5441534B5F50524F504552544945535F5F73720028636F6D2E72756F79692E70726F6A6563742E6D6F6E69746F722E6A6F622E646F6D61696E2E4A6F6200000000000000010200084C000E63726F6E45787072657373696F6E7400124C6A6176612F6C616E672F537472696E673B4C00086A6F6247726F757071007E00094C00056A6F6249647400104C6A6176612F6C616E672F4C6F6E673B4C00076A6F624E616D6571007E00094C000A6D6574686F644E616D6571007E00094C000C6D6574686F64506172616D7371007E00094C000D6D697366697265506F6C69637971007E00094C000673746174757371007E000978720029636F6D2E72756F79692E6672616D65776F726B2E7765622E646F6D61696E2E42617365456E7469747900000000000000010200074C0008637265617465427971007E00094C000A63726561746554696D657400104C6A6176612F7574696C2F446174653B4C0006706172616D7371007E00034C000672656D61726B71007E00094C000B73656172636856616C756571007E00094C0008757064617465427971007E00094C000A75706461746554696D6571007E000C787074000561646D696E7372000E6A6176612E7574696C2E44617465686A81014B59741903000078707708000001622CDE29E0787074000070707074000E302F3130202A202A202A202A203F740018E7B3BBE7BB9FE9BB98E8AEA4EFBC88E697A0E58F82EFBC897372000E6A6176612E6C616E672E4C6F6E673B8BE490CC8F23DF0200014A000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B0200007870000000000000000174000672795461736B74000A72794E6F506172616D7374000074000130740001317800);
GO
INSERT INTO [dbo].[qrtz_job_details] ([sched_name], [job_name], [job_group], [description], [job_class_name], [is_durable], [is_nonconcurrent], [is_update_data], [requests_recovery], [job_data]) VALUES (N'RuoyiScheduler', N'__TASK_CLASS_NAME__2', N'DEFAULT', null, N'com.ruoyi.project.monitor.job.util.ScheduleJob', N'0', N'0', N'0', N'0', 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000017400135F5F5441534B5F50524F504552544945535F5F73720028636F6D2E72756F79692E70726F6A6563742E6D6F6E69746F722E6A6F622E646F6D61696E2E4A6F6200000000000000010200084C000E63726F6E45787072657373696F6E7400124C6A6176612F6C616E672F537472696E673B4C00086A6F6247726F757071007E00094C00056A6F6249647400104C6A6176612F6C616E672F4C6F6E673B4C00076A6F624E616D6571007E00094C000A6D6574686F644E616D6571007E00094C000C6D6574686F64506172616D7371007E00094C000D6D697366697265506F6C69637971007E00094C000673746174757371007E000978720029636F6D2E72756F79692E6672616D65776F726B2E7765622E646F6D61696E2E42617365456E7469747900000000000000010200074C0008637265617465427971007E00094C000A63726561746554696D657400104C6A6176612F7574696C2F446174653B4C0006706172616D7371007E00034C000672656D61726B71007E00094C000B73656172636856616C756571007E00094C0008757064617465427971007E00094C000A75706461746554696D6571007E000C787074000561646D696E7372000E6A6176612E7574696C2E44617465686A81014B59741903000078707708000001622CDE29E0787074000070707074000E302F3230202A202A202A202A203F740018E7B3BBE7BB9FE9BB98E8AEA4EFBC88E69C89E58F82EFBC897372000E6A6176612E6C616E672E4C6F6E673B8BE490CC8F23DF0200014A000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B0200007870000000000000000274000672795461736B7400087279506172616D73740002727974000130740001317800);
GO

-- ----------------------------
-- Table structure for [dbo].[qrtz_locks]
-- ----------------------------
DROP TABLE [dbo].[qrtz_locks]
GO
CREATE TABLE [dbo].[qrtz_locks] (
[sched_name] varchar(120) NOT NULL DEFAULT '' ,
[lock_name] varchar(50) NOT NULL DEFAULT '' 
)


GO

-- ----------------------------
-- Records of qrtz_locks
-- ----------------------------
INSERT INTO [dbo].[qrtz_locks] ([sched_name], [lock_name]) VALUES (N'RuoyiScheduler', N'STATE_ACCESS');
GO
INSERT INTO [dbo].[qrtz_locks] ([sched_name], [lock_name]) VALUES (N'RuoyiScheduler', N'TRIGGER_ACCESS');
GO

-- ----------------------------
-- Table structure for [dbo].[qrtz_paused_trigger_grps]
-- ----------------------------
DROP TABLE [dbo].[qrtz_paused_trigger_grps]
GO
CREATE TABLE [dbo].[qrtz_paused_trigger_grps] (
[sched_name] varchar(120) NOT NULL DEFAULT '' ,
[trigger_group] varchar(200) NOT NULL DEFAULT '' 
)


GO

-- ----------------------------
-- Records of qrtz_paused_trigger_grps
-- ----------------------------

-- ----------------------------
-- Table structure for [dbo].[qrtz_scheduler_state]
-- ----------------------------
DROP TABLE [dbo].[qrtz_scheduler_state]
GO
CREATE TABLE [dbo].[qrtz_scheduler_state] (
[sched_name] varchar(120) NOT NULL DEFAULT '' ,
[instance_name] varchar(200) NOT NULL DEFAULT '' ,
[last_checkin_time] bigint NOT NULL DEFAULT ((0)) ,
[checkin_interval] bigint NOT NULL DEFAULT ((0)) 
)


GO

-- ----------------------------
-- Records of qrtz_scheduler_state
-- ----------------------------
INSERT INTO [dbo].[qrtz_scheduler_state] ([sched_name], [instance_name], [last_checkin_time], [checkin_interval]) VALUES (N'RuoyiScheduler', N'DAYE19791536281125434', N'1536281775649', N'15000');
GO

-- ----------------------------
-- Table structure for [dbo].[qrtz_simple_triggers]
-- ----------------------------
DROP TABLE [dbo].[qrtz_simple_triggers]
GO
CREATE TABLE [dbo].[qrtz_simple_triggers] (
[sched_name] varchar(120) NOT NULL DEFAULT '' ,
[trigger_name] varchar(200) NOT NULL DEFAULT '' ,
[trigger_group] varchar(200) NOT NULL DEFAULT '' ,
[repeat_count] bigint NOT NULL DEFAULT ((0)) ,
[repeat_interval] bigint NOT NULL DEFAULT ((0)) ,
[times_triggered] bigint NOT NULL DEFAULT ((0)) 
)


GO

-- ----------------------------
-- Records of qrtz_simple_triggers
-- ----------------------------

-- ----------------------------
-- Table structure for [dbo].[qrtz_simprop_triggers]
-- ----------------------------
DROP TABLE [dbo].[qrtz_simprop_triggers]
GO
CREATE TABLE [dbo].[qrtz_simprop_triggers] (
[sched_name] varchar(120) NOT NULL DEFAULT '' ,
[trigger_name] varchar(200) NOT NULL DEFAULT '' ,
[trigger_group] varchar(200) NOT NULL DEFAULT '' ,
[str_prop_1] varchar(512) NULL DEFAULT '' ,
[str_prop_2] varchar(512) NULL DEFAULT '' ,
[str_prop_3] varchar(512) NULL DEFAULT '' ,
[int_prop_1] int NULL DEFAULT ((0)) ,
[int_prop_2] int NULL DEFAULT ((0)) ,
[long_prop_1] bigint NULL DEFAULT ((0)) ,
[long_prop_2] bigint NULL DEFAULT ((0)) ,
[dec_prop_1] decimal(13,4) NULL DEFAULT ((0)) ,
[dec_prop_2] decimal(13,4) NULL DEFAULT ((0)) ,
[bool_prop_1] varchar(50) NULL DEFAULT '' ,
[bool_prop_2] varchar(50) NULL DEFAULT '' 
)


GO

-- ----------------------------
-- Records of qrtz_simprop_triggers
-- ----------------------------

-- ----------------------------
-- Table structure for [dbo].[qrtz_triggers]
-- ----------------------------
DROP TABLE [dbo].[qrtz_triggers]
GO
CREATE TABLE [dbo].[qrtz_triggers] (
[sched_name] varchar(120) NOT NULL DEFAULT '' ,
[trigger_name] varchar(200) NOT NULL DEFAULT '' ,
[trigger_group] varchar(200) NOT NULL DEFAULT '' ,
[job_name] varchar(200) NOT NULL DEFAULT '' ,
[job_group] varchar(200) NOT NULL DEFAULT '' ,
[description] varchar(250) NULL DEFAULT '' ,
[next_fire_time] bigint NULL DEFAULT ((0)) ,
[prev_fire_time] bigint NULL DEFAULT ((0)) ,
[priority] bigint NULL DEFAULT ((0)) ,
[trigger_state] varchar(50) NOT NULL DEFAULT '' ,
[trigger_type] varchar(50) NOT NULL DEFAULT '' ,
[start_time] bigint NOT NULL DEFAULT ((0)) ,
[end_time] bigint NULL DEFAULT ((0)) ,
[calendar_name] varchar(200) NULL DEFAULT '' ,
[misfire_instr] smallint NULL DEFAULT ((0)) ,
[job_data] varbinary(MAX) NULL 
)


GO

-- ----------------------------
-- Records of qrtz_triggers
-- ----------------------------
INSERT INTO [dbo].[qrtz_triggers] ([sched_name], [trigger_name], [trigger_group], [job_name], [job_group], [description], [next_fire_time], [prev_fire_time], [priority], [trigger_state], [trigger_type], [start_time], [end_time], [calendar_name], [misfire_instr], [job_data]) VALUES (N'RuoyiScheduler', N'__TASK_CLASS_NAME__1', N'DEFAULT', N'__TASK_CLASS_NAME__1', N'DEFAULT', null, N'1536221530000', N'-1', N'5', N'PAUSED', N'CRON', N'1536221526000', N'0', null, N'0', 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000017400135F5F5441534B5F50524F504552544945535F5F73720028636F6D2E72756F79692E70726F6A6563742E6D6F6E69746F722E6A6F622E646F6D61696E2E4A6F6200000000000000010200084C000E63726F6E45787072657373696F6E7400124C6A6176612F6C616E672F537472696E673B4C00086A6F6247726F757071007E00094C00056A6F6249647400104C6A6176612F6C616E672F4C6F6E673B4C00076A6F624E616D6571007E00094C000A6D6574686F644E616D6571007E00094C000C6D6574686F64506172616D7371007E00094C000D6D697366697265506F6C69637971007E00094C000673746174757371007E000978720029636F6D2E72756F79692E6672616D65776F726B2E7765622E646F6D61696E2E42617365456E7469747900000000000000010200074C0008637265617465427971007E00094C000A63726561746554696D657400104C6A6176612F7574696C2F446174653B4C0006706172616D7371007E00034C000672656D61726B71007E00094C000B73656172636856616C756571007E00094C0008757064617465427971007E00094C000A75706461746554696D6571007E000C787074000561646D696E7372000E6A6176612E7574696C2E44617465686A81014B59741903000078707708000001622CDE29E0787074000070707074000E302F3130202A202A202A202A203F740018E7B3BBE7BB9FE9BB98E8AEA4EFBC88E697A0E58F82EFBC897372000E6A6176612E6C616E672E4C6F6E673B8BE490CC8F23DF0200014A000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B0200007870000000000000000174000672795461736B74000A72794E6F506172616D7374000074000130740001317800);
GO
INSERT INTO [dbo].[qrtz_triggers] ([sched_name], [trigger_name], [trigger_group], [job_name], [job_group], [description], [next_fire_time], [prev_fire_time], [priority], [trigger_state], [trigger_type], [start_time], [end_time], [calendar_name], [misfire_instr], [job_data]) VALUES (N'RuoyiScheduler', N'__TASK_CLASS_NAME__2', N'DEFAULT', N'__TASK_CLASS_NAME__2', N'DEFAULT', null, N'1536221540000', N'-1', N'5', N'PAUSED', N'CRON', N'1536221527000', N'0', null, N'0', 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C770800000010000000017400135F5F5441534B5F50524F504552544945535F5F73720028636F6D2E72756F79692E70726F6A6563742E6D6F6E69746F722E6A6F622E646F6D61696E2E4A6F6200000000000000010200084C000E63726F6E45787072657373696F6E7400124C6A6176612F6C616E672F537472696E673B4C00086A6F6247726F757071007E00094C00056A6F6249647400104C6A6176612F6C616E672F4C6F6E673B4C00076A6F624E616D6571007E00094C000A6D6574686F644E616D6571007E00094C000C6D6574686F64506172616D7371007E00094C000D6D697366697265506F6C69637971007E00094C000673746174757371007E000978720029636F6D2E72756F79692E6672616D65776F726B2E7765622E646F6D61696E2E42617365456E7469747900000000000000010200074C0008637265617465427971007E00094C000A63726561746554696D657400104C6A6176612F7574696C2F446174653B4C0006706172616D7371007E00034C000672656D61726B71007E00094C000B73656172636856616C756571007E00094C0008757064617465427971007E00094C000A75706461746554696D6571007E000C787074000561646D696E7372000E6A6176612E7574696C2E44617465686A81014B59741903000078707708000001622CDE29E0787074000070707074000E302F3230202A202A202A202A203F740018E7B3BBE7BB9FE9BB98E8AEA4EFBC88E69C89E58F82EFBC897372000E6A6176612E6C616E672E4C6F6E673B8BE490CC8F23DF0200014A000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B0200007870000000000000000274000672795461736B7400087279506172616D73740002727974000130740001317800);
GO

-- ----------------------------
-- Table structure for [dbo].[sys_config]
-- ----------------------------
DROP TABLE [dbo].[sys_config]
GO
CREATE TABLE [dbo].[sys_config] (
[config_id] bigint NOT NULL IDENTITY(1,1) ,
[config_name] varchar(100) NULL DEFAULT '' ,
[config_key] varchar(100) NULL DEFAULT '' ,
[config_value] varchar(100) NULL DEFAULT '' ,
[config_type] varchar(1) NULL DEFAULT '' ,
[create_by] varchar(64) NULL DEFAULT '' ,
[create_time] datetime NULL DEFAULT '' ,
[update_by] varchar(64) NULL DEFAULT '' ,
[update_time] datetime NULL DEFAULT (getdate()) ,
[remark] varchar(500) NULL DEFAULT '' 
)


GO
DBCC CHECKIDENT(N'[dbo].[sys_config]', RESEED, 2)
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_config', 
NULL, NULL)) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'参数配置表'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_config'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'参数配置表'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_config'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_config', 
'COLUMN', N'config_id')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'参数主键'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_config'
, @level2type = 'COLUMN', @level2name = N'config_id'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'参数主键'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_config'
, @level2type = 'COLUMN', @level2name = N'config_id'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_config', 
'COLUMN', N'config_name')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'参数名称'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_config'
, @level2type = 'COLUMN', @level2name = N'config_name'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'参数名称'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_config'
, @level2type = 'COLUMN', @level2name = N'config_name'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_config', 
'COLUMN', N'config_key')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'参数键名'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_config'
, @level2type = 'COLUMN', @level2name = N'config_key'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'参数键名'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_config'
, @level2type = 'COLUMN', @level2name = N'config_key'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_config', 
'COLUMN', N'config_value')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'参数键值'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_config'
, @level2type = 'COLUMN', @level2name = N'config_value'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'参数键值'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_config'
, @level2type = 'COLUMN', @level2name = N'config_value'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_config', 
'COLUMN', N'config_type')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'系统内置（Y是 N否）'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_config'
, @level2type = 'COLUMN', @level2name = N'config_type'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'系统内置（Y是 N否）'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_config'
, @level2type = 'COLUMN', @level2name = N'config_type'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_config', 
'COLUMN', N'create_by')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'创建者'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_config'
, @level2type = 'COLUMN', @level2name = N'create_by'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'创建者'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_config'
, @level2type = 'COLUMN', @level2name = N'create_by'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_config', 
'COLUMN', N'create_time')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'创建时间'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_config'
, @level2type = 'COLUMN', @level2name = N'create_time'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'创建时间'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_config'
, @level2type = 'COLUMN', @level2name = N'create_time'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_config', 
'COLUMN', N'update_by')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'更新者'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_config'
, @level2type = 'COLUMN', @level2name = N'update_by'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'更新者'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_config'
, @level2type = 'COLUMN', @level2name = N'update_by'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_config', 
'COLUMN', N'update_time')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'更新时间'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_config'
, @level2type = 'COLUMN', @level2name = N'update_time'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'更新时间'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_config'
, @level2type = 'COLUMN', @level2name = N'update_time'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_config', 
'COLUMN', N'remark')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'备注'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_config'
, @level2type = 'COLUMN', @level2name = N'remark'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'备注'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_config'
, @level2type = 'COLUMN', @level2name = N'remark'
GO

-- ----------------------------
-- Records of sys_config
-- ----------------------------
SET IDENTITY_INSERT [dbo].[sys_config] ON
GO
INSERT INTO [dbo].[sys_config] ([config_id], [config_name], [config_key], [config_value], [config_type], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'1', N'主框架页-默认皮肤样式名称', N'sys.index.skinName', N'skin-default', N'Y', N'admin', N'2018-03-16 11:33:00.000', N'admin', N'2018-09-10 09:41:30.470', N'默认 skin-default、蓝色 skin-blue、黄色 skin-yellow');
GO
INSERT INTO [dbo].[sys_config] ([config_id], [config_name], [config_key], [config_value], [config_type], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'2', N'用户管理-账号初始密码', N'sys.user.initPassword', N'123456', N'Y', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'初始化密码 123456');
GO
SET IDENTITY_INSERT [dbo].[sys_config] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[sys_dept]
-- ----------------------------
DROP TABLE [dbo].[sys_dept]
GO
CREATE TABLE [dbo].[sys_dept] (
[dept_id] bigint NOT NULL IDENTITY(1,1) ,
[parent_id] bigint NULL DEFAULT ((0)) ,
[ancestors] varchar(50) NULL DEFAULT '' ,
[dept_name] varchar(50) NULL DEFAULT '' ,
[order_num] bigint NULL DEFAULT ((0)) ,
[leader] varchar(50) NULL DEFAULT '' ,
[phone] varchar(50) NULL DEFAULT '' ,
[email] varchar(50) NULL DEFAULT '' ,
[status] varchar(1) NULL DEFAULT ((0)) ,
[del_flag] varchar(1) NULL DEFAULT ((0)) ,
[create_by] varchar(64) NULL DEFAULT '' ,
[create_time] datetime NULL DEFAULT (getdate()) ,
[update_by] varchar(64) NULL DEFAULT '' ,
[update_time] datetime NULL DEFAULT (getdate()) 
)


GO
DBCC CHECKIDENT(N'[dbo].[sys_dept]', RESEED, 109)
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_dept', 
NULL, NULL)) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'部门表'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_dept'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'部门表'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_dept'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_dept', 
'COLUMN', N'dept_id')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'部门id'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_dept'
, @level2type = 'COLUMN', @level2name = N'dept_id'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'部门id'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_dept'
, @level2type = 'COLUMN', @level2name = N'dept_id'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_dept', 
'COLUMN', N'parent_id')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'父部门id'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_dept'
, @level2type = 'COLUMN', @level2name = N'parent_id'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'父部门id'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_dept'
, @level2type = 'COLUMN', @level2name = N'parent_id'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_dept', 
'COLUMN', N'ancestors')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'祖级列表'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_dept'
, @level2type = 'COLUMN', @level2name = N'ancestors'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'祖级列表'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_dept'
, @level2type = 'COLUMN', @level2name = N'ancestors'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_dept', 
'COLUMN', N'dept_name')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'部门名称'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_dept'
, @level2type = 'COLUMN', @level2name = N'dept_name'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'部门名称'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_dept'
, @level2type = 'COLUMN', @level2name = N'dept_name'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_dept', 
'COLUMN', N'order_num')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'显示顺序'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_dept'
, @level2type = 'COLUMN', @level2name = N'order_num'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'显示顺序'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_dept'
, @level2type = 'COLUMN', @level2name = N'order_num'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_dept', 
'COLUMN', N'leader')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'负责人'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_dept'
, @level2type = 'COLUMN', @level2name = N'leader'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'负责人'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_dept'
, @level2type = 'COLUMN', @level2name = N'leader'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_dept', 
'COLUMN', N'phone')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'联系电话'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_dept'
, @level2type = 'COLUMN', @level2name = N'phone'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'联系电话'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_dept'
, @level2type = 'COLUMN', @level2name = N'phone'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_dept', 
'COLUMN', N'email')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'邮箱'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_dept'
, @level2type = 'COLUMN', @level2name = N'email'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'邮箱'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_dept'
, @level2type = 'COLUMN', @level2name = N'email'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_dept', 
'COLUMN', N'status')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'部门状态（0正常 1停用）'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_dept'
, @level2type = 'COLUMN', @level2name = N'status'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'部门状态（0正常 1停用）'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_dept'
, @level2type = 'COLUMN', @level2name = N'status'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_dept', 
'COLUMN', N'del_flag')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'删除标志（0代表存在 2代表删除）'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_dept'
, @level2type = 'COLUMN', @level2name = N'del_flag'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'删除标志（0代表存在 2代表删除）'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_dept'
, @level2type = 'COLUMN', @level2name = N'del_flag'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_dept', 
'COLUMN', N'create_by')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'创建者'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_dept'
, @level2type = 'COLUMN', @level2name = N'create_by'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'创建者'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_dept'
, @level2type = 'COLUMN', @level2name = N'create_by'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_dept', 
'COLUMN', N'create_time')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'创建时间'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_dept'
, @level2type = 'COLUMN', @level2name = N'create_time'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'创建时间'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_dept'
, @level2type = 'COLUMN', @level2name = N'create_time'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_dept', 
'COLUMN', N'update_by')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'更新者'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_dept'
, @level2type = 'COLUMN', @level2name = N'update_by'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'更新者'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_dept'
, @level2type = 'COLUMN', @level2name = N'update_by'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_dept', 
'COLUMN', N'update_time')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'更新时间'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_dept'
, @level2type = 'COLUMN', @level2name = N'update_time'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'更新时间'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_dept'
, @level2type = 'COLUMN', @level2name = N'update_time'
GO

-- ----------------------------
-- Records of sys_dept
-- ----------------------------
SET IDENTITY_INSERT [dbo].[sys_dept] ON
GO
INSERT INTO [dbo].[sys_dept] ([dept_id], [parent_id], [ancestors], [dept_name], [order_num], [leader], [phone], [email], [status], [del_flag], [create_by], [create_time], [update_by], [update_time]) VALUES (N'100', N'0', N'0', N'南华糖业', N'0', N'若依', N'15888888888', N'ry@qq.com', N'0', N'0', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000');
GO
INSERT INTO [dbo].[sys_dept] ([dept_id], [parent_id], [ancestors], [dept_name], [order_num], [leader], [phone], [email], [status], [del_flag], [create_by], [create_time], [update_by], [update_time]) VALUES (N'101', N'100', N'0,100', N'深圳总公司', N'1', N'若依', N'15888888888', N'ry@qq.com', N'0', N'0', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000');
GO
INSERT INTO [dbo].[sys_dept] ([dept_id], [parent_id], [ancestors], [dept_name], [order_num], [leader], [phone], [email], [status], [del_flag], [create_by], [create_time], [update_by], [update_time]) VALUES (N'102', N'100', N'0,100', N'长沙分公司', N'2', N'若依', N'15888888888', N'ry@qq.com', N'0', N'0', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000');
GO
INSERT INTO [dbo].[sys_dept] ([dept_id], [parent_id], [ancestors], [dept_name], [order_num], [leader], [phone], [email], [status], [del_flag], [create_by], [create_time], [update_by], [update_time]) VALUES (N'103', N'101', N'0,100,101', N'研发部门', N'1', N'若依', N'15888888888', N'ry@qq.com', N'0', N'0', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000');
GO
INSERT INTO [dbo].[sys_dept] ([dept_id], [parent_id], [ancestors], [dept_name], [order_num], [leader], [phone], [email], [status], [del_flag], [create_by], [create_time], [update_by], [update_time]) VALUES (N'104', N'101', N'0,100,101', N'市场部门', N'2', N'若依', N'15888888888', N'ry@qq.com', N'0', N'0', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000');
GO
INSERT INTO [dbo].[sys_dept] ([dept_id], [parent_id], [ancestors], [dept_name], [order_num], [leader], [phone], [email], [status], [del_flag], [create_by], [create_time], [update_by], [update_time]) VALUES (N'105', N'101', N'0,100,101', N'测试部门', N'3', N'若依', N'15888888888', N'ry@qq.com', N'0', N'0', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000');
GO
INSERT INTO [dbo].[sys_dept] ([dept_id], [parent_id], [ancestors], [dept_name], [order_num], [leader], [phone], [email], [status], [del_flag], [create_by], [create_time], [update_by], [update_time]) VALUES (N'106', N'101', N'0,100,101', N'财务部门', N'4', N'若依', N'15888888888', N'ry@qq.com', N'0', N'0', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000');
GO
INSERT INTO [dbo].[sys_dept] ([dept_id], [parent_id], [ancestors], [dept_name], [order_num], [leader], [phone], [email], [status], [del_flag], [create_by], [create_time], [update_by], [update_time]) VALUES (N'107', N'101', N'0,100,101', N'运维部门', N'5', N'若依', N'15888888888', N'ry@qq.com', N'0', N'0', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000');
GO
INSERT INTO [dbo].[sys_dept] ([dept_id], [parent_id], [ancestors], [dept_name], [order_num], [leader], [phone], [email], [status], [del_flag], [create_by], [create_time], [update_by], [update_time]) VALUES (N'108', N'102', N'0,100,102', N'市场部门', N'1', N'若依', N'15888888888', N'ry@qq.com', N'0', N'0', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000');
GO
INSERT INTO [dbo].[sys_dept] ([dept_id], [parent_id], [ancestors], [dept_name], [order_num], [leader], [phone], [email], [status], [del_flag], [create_by], [create_time], [update_by], [update_time]) VALUES (N'109', N'102', N'0,100,102', N'财务部门', N'2', N'若依', N'15888888888', N'ry@qq.com', N'0', N'0', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000');
GO
SET IDENTITY_INSERT [dbo].[sys_dept] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[sys_dict_data]
-- ----------------------------
DROP TABLE [dbo].[sys_dict_data]
GO
CREATE TABLE [dbo].[sys_dict_data] (
[dict_code] bigint NOT NULL IDENTITY(1,1) ,
[dict_sort] bigint NULL DEFAULT ((0)) ,
[dict_label] varchar(100) NULL DEFAULT '' ,
[dict_value] varchar(100) NULL DEFAULT '' ,
[dict_type] varchar(100) NULL DEFAULT '' ,
[css_class] varchar(500) NULL DEFAULT '' ,
[list_class] varchar(500) NULL DEFAULT '' ,
[is_default] varchar(1) NULL DEFAULT ((0)) ,
[status] varchar(1) NULL DEFAULT ((0)) ,
[create_by] varchar(64) NULL DEFAULT '' ,
[create_time] datetime NULL DEFAULT (getdate()) ,
[update_by] varchar(64) NULL DEFAULT '' ,
[update_time] datetime NULL DEFAULT (getdate()) ,
[remark] varchar(500) NULL DEFAULT '' 
)


GO
DBCC CHECKIDENT(N'[dbo].[sys_dict_data]', RESEED, 25)
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_dict_data', 
NULL, NULL)) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'字典数据表'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_dict_data'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'字典数据表'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_dict_data'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_dict_data', 
'COLUMN', N'dict_code')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'字典编码'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_dict_data'
, @level2type = 'COLUMN', @level2name = N'dict_code'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'字典编码'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_dict_data'
, @level2type = 'COLUMN', @level2name = N'dict_code'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_dict_data', 
'COLUMN', N'dict_sort')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'字典排序'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_dict_data'
, @level2type = 'COLUMN', @level2name = N'dict_sort'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'字典排序'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_dict_data'
, @level2type = 'COLUMN', @level2name = N'dict_sort'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_dict_data', 
'COLUMN', N'dict_label')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'字典标签'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_dict_data'
, @level2type = 'COLUMN', @level2name = N'dict_label'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'字典标签'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_dict_data'
, @level2type = 'COLUMN', @level2name = N'dict_label'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_dict_data', 
'COLUMN', N'dict_value')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'字典键值'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_dict_data'
, @level2type = 'COLUMN', @level2name = N'dict_value'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'字典键值'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_dict_data'
, @level2type = 'COLUMN', @level2name = N'dict_value'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_dict_data', 
'COLUMN', N'dict_type')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'字典类型'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_dict_data'
, @level2type = 'COLUMN', @level2name = N'dict_type'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'字典类型'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_dict_data'
, @level2type = 'COLUMN', @level2name = N'dict_type'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_dict_data', 
'COLUMN', N'css_class')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'样式属性（其他样式扩展）'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_dict_data'
, @level2type = 'COLUMN', @level2name = N'css_class'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'样式属性（其他样式扩展）'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_dict_data'
, @level2type = 'COLUMN', @level2name = N'css_class'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_dict_data', 
'COLUMN', N'list_class')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'表格回显样式'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_dict_data'
, @level2type = 'COLUMN', @level2name = N'list_class'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'表格回显样式'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_dict_data'
, @level2type = 'COLUMN', @level2name = N'list_class'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_dict_data', 
'COLUMN', N'is_default')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'是否默认（Y是 N否）'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_dict_data'
, @level2type = 'COLUMN', @level2name = N'is_default'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'是否默认（Y是 N否）'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_dict_data'
, @level2type = 'COLUMN', @level2name = N'is_default'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_dict_data', 
'COLUMN', N'status')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'状态（0正常 1停用）'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_dict_data'
, @level2type = 'COLUMN', @level2name = N'status'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'状态（0正常 1停用）'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_dict_data'
, @level2type = 'COLUMN', @level2name = N'status'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_dict_data', 
'COLUMN', N'create_by')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'创建者'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_dict_data'
, @level2type = 'COLUMN', @level2name = N'create_by'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'创建者'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_dict_data'
, @level2type = 'COLUMN', @level2name = N'create_by'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_dict_data', 
'COLUMN', N'create_time')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'创建时间'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_dict_data'
, @level2type = 'COLUMN', @level2name = N'create_time'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'创建时间'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_dict_data'
, @level2type = 'COLUMN', @level2name = N'create_time'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_dict_data', 
'COLUMN', N'update_by')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'更新者'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_dict_data'
, @level2type = 'COLUMN', @level2name = N'update_by'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'更新者'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_dict_data'
, @level2type = 'COLUMN', @level2name = N'update_by'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_dict_data', 
'COLUMN', N'update_time')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'更新时间'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_dict_data'
, @level2type = 'COLUMN', @level2name = N'update_time'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'更新时间'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_dict_data'
, @level2type = 'COLUMN', @level2name = N'update_time'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_dict_data', 
'COLUMN', N'remark')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'备注'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_dict_data'
, @level2type = 'COLUMN', @level2name = N'remark'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'备注'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_dict_data'
, @level2type = 'COLUMN', @level2name = N'remark'
GO

-- ----------------------------
-- Records of sys_dict_data
-- ----------------------------
SET IDENTITY_INSERT [dbo].[sys_dict_data] ON
GO
INSERT INTO [dbo].[sys_dict_data] ([dict_code], [dict_sort], [dict_label], [dict_value], [dict_type], [css_class], [list_class], [is_default], [status], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'1', N'1', N'男', N'0', N'sys_user_sex', N'', N'', N'Y', N'0', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'性别男');
GO
INSERT INTO [dbo].[sys_dict_data] ([dict_code], [dict_sort], [dict_label], [dict_value], [dict_type], [css_class], [list_class], [is_default], [status], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'2', N'2', N'女', N'1', N'sys_user_sex', N'', N'', N'N', N'0', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'性别女');
GO
INSERT INTO [dbo].[sys_dict_data] ([dict_code], [dict_sort], [dict_label], [dict_value], [dict_type], [css_class], [list_class], [is_default], [status], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'3', N'3', N'未知', N'2', N'sys_user_sex', N'', N'', N'N', N'0', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'性别未知');
GO
INSERT INTO [dbo].[sys_dict_data] ([dict_code], [dict_sort], [dict_label], [dict_value], [dict_type], [css_class], [list_class], [is_default], [status], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'4', N'1', N'显示', N'0', N'sys_show_hide', N'', N'primary', N'Y', N'0', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'显示菜单');
GO
INSERT INTO [dbo].[sys_dict_data] ([dict_code], [dict_sort], [dict_label], [dict_value], [dict_type], [css_class], [list_class], [is_default], [status], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'5', N'2', N'隐藏', N'1', N'sys_show_hide', N'', N'danger', N'N', N'0', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'隐藏菜单');
GO
INSERT INTO [dbo].[sys_dict_data] ([dict_code], [dict_sort], [dict_label], [dict_value], [dict_type], [css_class], [list_class], [is_default], [status], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'6', N'1', N'正常', N'0', N'sys_normal_disable', N'', N'primary', N'Y', N'0', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'正常状态');
GO
INSERT INTO [dbo].[sys_dict_data] ([dict_code], [dict_sort], [dict_label], [dict_value], [dict_type], [css_class], [list_class], [is_default], [status], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'7', N'2', N'停用', N'1', N'sys_normal_disable', N'', N'danger', N'N', N'0', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'停用状态');
GO
INSERT INTO [dbo].[sys_dict_data] ([dict_code], [dict_sort], [dict_label], [dict_value], [dict_type], [css_class], [list_class], [is_default], [status], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'8', N'1', N'正常', N'0', N'sys_job_status', N'', N'primary', N'Y', N'0', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'正常状态');
GO
INSERT INTO [dbo].[sys_dict_data] ([dict_code], [dict_sort], [dict_label], [dict_value], [dict_type], [css_class], [list_class], [is_default], [status], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'9', N'2', N'暂停', N'1', N'sys_job_status', N'', N'danger', N'N', N'0', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'停用状态');
GO
INSERT INTO [dbo].[sys_dict_data] ([dict_code], [dict_sort], [dict_label], [dict_value], [dict_type], [css_class], [list_class], [is_default], [status], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'10', N'1', N'是', N'Y', N'sys_yes_no', N'', N'primary', N'Y', N'0', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'系统默认是');
GO
INSERT INTO [dbo].[sys_dict_data] ([dict_code], [dict_sort], [dict_label], [dict_value], [dict_type], [css_class], [list_class], [is_default], [status], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'11', N'2', N'否', N'N', N'sys_yes_no', N'', N'danger', N'N', N'0', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'系统默认否');
GO
INSERT INTO [dbo].[sys_dict_data] ([dict_code], [dict_sort], [dict_label], [dict_value], [dict_type], [css_class], [list_class], [is_default], [status], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'12', N'1', N'通知', N'1', N'sys_notice_type', N'', N'warning', N'Y', N'0', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'通知');
GO
INSERT INTO [dbo].[sys_dict_data] ([dict_code], [dict_sort], [dict_label], [dict_value], [dict_type], [css_class], [list_class], [is_default], [status], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'13', N'2', N'公告', N'2', N'sys_notice_type', N'', N'success', N'N', N'0', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'公告');
GO
INSERT INTO [dbo].[sys_dict_data] ([dict_code], [dict_sort], [dict_label], [dict_value], [dict_type], [css_class], [list_class], [is_default], [status], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'14', N'1', N'正常', N'0', N'sys_notice_status', N'', N'primary', N'Y', N'0', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'正常状态');
GO
INSERT INTO [dbo].[sys_dict_data] ([dict_code], [dict_sort], [dict_label], [dict_value], [dict_type], [css_class], [list_class], [is_default], [status], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'15', N'2', N'关闭', N'1', N'sys_notice_status', N'', N'danger', N'N', N'0', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'关闭状态');
GO
INSERT INTO [dbo].[sys_dict_data] ([dict_code], [dict_sort], [dict_label], [dict_value], [dict_type], [css_class], [list_class], [is_default], [status], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'16', N'1', N'新增', N'1', N'sys_oper_type', N'', N'info', N'N', N'0', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'新增操作');
GO
INSERT INTO [dbo].[sys_dict_data] ([dict_code], [dict_sort], [dict_label], [dict_value], [dict_type], [css_class], [list_class], [is_default], [status], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'17', N'2', N'修改', N'2', N'sys_oper_type', N'', N'info', N'N', N'0', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'新增操作');
GO
INSERT INTO [dbo].[sys_dict_data] ([dict_code], [dict_sort], [dict_label], [dict_value], [dict_type], [css_class], [list_class], [is_default], [status], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'18', N'3', N'删除', N'3', N'sys_oper_type', N'', N'danger', N'N', N'0', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'新增操作');
GO
INSERT INTO [dbo].[sys_dict_data] ([dict_code], [dict_sort], [dict_label], [dict_value], [dict_type], [css_class], [list_class], [is_default], [status], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'19', N'4', N'授权', N'4', N'sys_oper_type', N'', N'primary', N'N', N'0', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'新增操作');
GO
INSERT INTO [dbo].[sys_dict_data] ([dict_code], [dict_sort], [dict_label], [dict_value], [dict_type], [css_class], [list_class], [is_default], [status], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'20', N'5', N'导出', N'5', N'sys_oper_type', N'', N'warning', N'N', N'0', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'新增操作');
GO
INSERT INTO [dbo].[sys_dict_data] ([dict_code], [dict_sort], [dict_label], [dict_value], [dict_type], [css_class], [list_class], [is_default], [status], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'21', N'6', N'导入', N'6', N'sys_oper_type', N'', N'warning', N'N', N'0', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'新增操作');
GO
INSERT INTO [dbo].[sys_dict_data] ([dict_code], [dict_sort], [dict_label], [dict_value], [dict_type], [css_class], [list_class], [is_default], [status], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'22', N'7', N'强退', N'7', N'sys_oper_type', N'', N'danger', N'N', N'0', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'新增操作');
GO
INSERT INTO [dbo].[sys_dict_data] ([dict_code], [dict_sort], [dict_label], [dict_value], [dict_type], [css_class], [list_class], [is_default], [status], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'23', N'8', N'生成代码', N'8', N'sys_oper_type', N'', N'warning', N'N', N'0', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'新增操作');
GO
INSERT INTO [dbo].[sys_dict_data] ([dict_code], [dict_sort], [dict_label], [dict_value], [dict_type], [css_class], [list_class], [is_default], [status], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'24', N'1', N'成功', N'0', N'sys_common_status', N'', N'primary', N'N', N'0', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'正常状态');
GO
INSERT INTO [dbo].[sys_dict_data] ([dict_code], [dict_sort], [dict_label], [dict_value], [dict_type], [css_class], [list_class], [is_default], [status], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'25', N'2', N'失败', N'1', N'sys_common_status', N'', N'danger', N'N', N'0', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'停用状态');
GO
SET IDENTITY_INSERT [dbo].[sys_dict_data] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[sys_dict_type]
-- ----------------------------
DROP TABLE [dbo].[sys_dict_type]
GO
CREATE TABLE [dbo].[sys_dict_type] (
[dict_id] bigint NOT NULL IDENTITY(1,1) ,
[dict_name] varchar(100) NULL DEFAULT '' ,
[dict_type] varchar(100) NULL DEFAULT '' ,
[status] varchar(1) NULL DEFAULT ((0)) ,
[create_by] varchar(64) NULL DEFAULT '' ,
[create_time] datetime NULL DEFAULT (getdate()) ,
[update_by] varchar(64) NULL DEFAULT '' ,
[update_time] datetime NULL DEFAULT (getdate()) ,
[remark] varchar(500) NULL DEFAULT '' 
)


GO
DBCC CHECKIDENT(N'[dbo].[sys_dict_type]', RESEED, 9)
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_dict_type', 
NULL, NULL)) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'字典类型表'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_dict_type'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'字典类型表'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_dict_type'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_dict_type', 
'COLUMN', N'dict_id')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'字典主键'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_dict_type'
, @level2type = 'COLUMN', @level2name = N'dict_id'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'字典主键'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_dict_type'
, @level2type = 'COLUMN', @level2name = N'dict_id'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_dict_type', 
'COLUMN', N'dict_name')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'字典名称'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_dict_type'
, @level2type = 'COLUMN', @level2name = N'dict_name'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'字典名称'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_dict_type'
, @level2type = 'COLUMN', @level2name = N'dict_name'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_dict_type', 
'COLUMN', N'dict_type')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'字典类型'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_dict_type'
, @level2type = 'COLUMN', @level2name = N'dict_type'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'字典类型'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_dict_type'
, @level2type = 'COLUMN', @level2name = N'dict_type'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_dict_type', 
'COLUMN', N'status')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'状态（0正常 1停用）'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_dict_type'
, @level2type = 'COLUMN', @level2name = N'status'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'状态（0正常 1停用）'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_dict_type'
, @level2type = 'COLUMN', @level2name = N'status'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_dict_type', 
'COLUMN', N'create_by')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'创建者'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_dict_type'
, @level2type = 'COLUMN', @level2name = N'create_by'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'创建者'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_dict_type'
, @level2type = 'COLUMN', @level2name = N'create_by'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_dict_type', 
'COLUMN', N'create_time')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'创建时间'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_dict_type'
, @level2type = 'COLUMN', @level2name = N'create_time'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'创建时间'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_dict_type'
, @level2type = 'COLUMN', @level2name = N'create_time'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_dict_type', 
'COLUMN', N'update_by')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'更新者'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_dict_type'
, @level2type = 'COLUMN', @level2name = N'update_by'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'更新者'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_dict_type'
, @level2type = 'COLUMN', @level2name = N'update_by'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_dict_type', 
'COLUMN', N'update_time')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'更新时间'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_dict_type'
, @level2type = 'COLUMN', @level2name = N'update_time'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'更新时间'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_dict_type'
, @level2type = 'COLUMN', @level2name = N'update_time'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_dict_type', 
'COLUMN', N'remark')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'备注'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_dict_type'
, @level2type = 'COLUMN', @level2name = N'remark'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'备注'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_dict_type'
, @level2type = 'COLUMN', @level2name = N'remark'
GO

-- ----------------------------
-- Records of sys_dict_type
-- ----------------------------
SET IDENTITY_INSERT [dbo].[sys_dict_type] ON
GO
INSERT INTO [dbo].[sys_dict_type] ([dict_id], [dict_name], [dict_type], [status], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'1', N'用户性别', N'sys_user_sex', N'0', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'用户性别列表');
GO
INSERT INTO [dbo].[sys_dict_type] ([dict_id], [dict_name], [dict_type], [status], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'2', N'菜单状态', N'sys_show_hide', N'0', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'菜单状态列表');
GO
INSERT INTO [dbo].[sys_dict_type] ([dict_id], [dict_name], [dict_type], [status], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'3', N'系统开关', N'sys_normal_disable', N'0', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'系统开关列表');
GO
INSERT INTO [dbo].[sys_dict_type] ([dict_id], [dict_name], [dict_type], [status], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'4', N'任务状态', N'sys_job_status', N'0', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'任务状态列表');
GO
INSERT INTO [dbo].[sys_dict_type] ([dict_id], [dict_name], [dict_type], [status], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'5', N'系统是否', N'sys_yes_no', N'0', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'系统是否列表');
GO
INSERT INTO [dbo].[sys_dict_type] ([dict_id], [dict_name], [dict_type], [status], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'6', N'通知类型', N'sys_notice_type', N'0', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'通知类型列表');
GO
INSERT INTO [dbo].[sys_dict_type] ([dict_id], [dict_name], [dict_type], [status], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'7', N'通知状态', N'sys_notice_status', N'0', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'通知状态列表');
GO
INSERT INTO [dbo].[sys_dict_type] ([dict_id], [dict_name], [dict_type], [status], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'8', N'操作类型', N'sys_oper_type', N'0', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'操作类型列表');
GO
INSERT INTO [dbo].[sys_dict_type] ([dict_id], [dict_name], [dict_type], [status], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'9', N'系统状态', N'sys_common_status', N'0', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'登录状态列表');
GO
SET IDENTITY_INSERT [dbo].[sys_dict_type] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[sys_job]
-- ----------------------------
DROP TABLE [dbo].[sys_job]
GO
CREATE TABLE [dbo].[sys_job] (
[job_id] bigint NOT NULL IDENTITY(1,1) ,
[job_name] varchar(64) NOT NULL DEFAULT '' ,
[job_group] varchar(64) NOT NULL DEFAULT '' ,
[method_name] varchar(500) NULL DEFAULT '' ,
[method_params] varchar(200) NULL DEFAULT '' ,
[cron_expression] varchar(255) NULL DEFAULT '' ,
[misfire_policy] varchar(50) NULL DEFAULT '' ,
[status] varchar(1) NULL DEFAULT ((0)) ,
[create_by] varchar(64) NULL DEFAULT '' ,
[create_time] datetime NULL DEFAULT (getdate()) ,
[update_by] varchar(64) NULL DEFAULT '' ,
[update_time] datetime NULL DEFAULT (getdate()) ,
[remark] varchar(500) NULL DEFAULT '' 
)


GO
DBCC CHECKIDENT(N'[dbo].[sys_job]', RESEED, 2)
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_job', 
NULL, NULL)) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'定时任务调度表'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_job'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'定时任务调度表'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_job'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_job', 
'COLUMN', N'job_id')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'任务ID'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_job'
, @level2type = 'COLUMN', @level2name = N'job_id'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'任务ID'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_job'
, @level2type = 'COLUMN', @level2name = N'job_id'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_job', 
'COLUMN', N'job_name')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'任务名称'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_job'
, @level2type = 'COLUMN', @level2name = N'job_name'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'任务名称'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_job'
, @level2type = 'COLUMN', @level2name = N'job_name'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_job', 
'COLUMN', N'job_group')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'任务组名'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_job'
, @level2type = 'COLUMN', @level2name = N'job_group'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'任务组名'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_job'
, @level2type = 'COLUMN', @level2name = N'job_group'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_job', 
'COLUMN', N'method_name')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'任务方法'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_job'
, @level2type = 'COLUMN', @level2name = N'method_name'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'任务方法'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_job'
, @level2type = 'COLUMN', @level2name = N'method_name'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_job', 
'COLUMN', N'method_params')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'方法参数'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_job'
, @level2type = 'COLUMN', @level2name = N'method_params'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'方法参数'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_job'
, @level2type = 'COLUMN', @level2name = N'method_params'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_job', 
'COLUMN', N'cron_expression')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'cron执行表达式'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_job'
, @level2type = 'COLUMN', @level2name = N'cron_expression'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'cron执行表达式'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_job'
, @level2type = 'COLUMN', @level2name = N'cron_expression'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_job', 
'COLUMN', N'misfire_policy')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'计划执行错误策略（0默认 1继续 2等待 3放弃）'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_job'
, @level2type = 'COLUMN', @level2name = N'misfire_policy'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'计划执行错误策略（0默认 1继续 2等待 3放弃）'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_job'
, @level2type = 'COLUMN', @level2name = N'misfire_policy'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_job', 
'COLUMN', N'status')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'状态（0正常 1暂停）'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_job'
, @level2type = 'COLUMN', @level2name = N'status'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'状态（0正常 1暂停）'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_job'
, @level2type = 'COLUMN', @level2name = N'status'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_job', 
'COLUMN', N'create_by')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'创建者'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_job'
, @level2type = 'COLUMN', @level2name = N'create_by'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'创建者'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_job'
, @level2type = 'COLUMN', @level2name = N'create_by'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_job', 
'COLUMN', N'create_time')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'创建时间'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_job'
, @level2type = 'COLUMN', @level2name = N'create_time'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'创建时间'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_job'
, @level2type = 'COLUMN', @level2name = N'create_time'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_job', 
'COLUMN', N'update_by')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'更新者'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_job'
, @level2type = 'COLUMN', @level2name = N'update_by'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'更新者'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_job'
, @level2type = 'COLUMN', @level2name = N'update_by'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_job', 
'COLUMN', N'update_time')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'更新时间'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_job'
, @level2type = 'COLUMN', @level2name = N'update_time'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'更新时间'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_job'
, @level2type = 'COLUMN', @level2name = N'update_time'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_job', 
'COLUMN', N'remark')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'备注信息'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_job'
, @level2type = 'COLUMN', @level2name = N'remark'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'备注信息'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_job'
, @level2type = 'COLUMN', @level2name = N'remark'
GO

-- ----------------------------
-- Records of sys_job
-- ----------------------------
SET IDENTITY_INSERT [dbo].[sys_job] ON
GO
INSERT INTO [dbo].[sys_job] ([job_id], [job_name], [job_group], [method_name], [method_params], [cron_expression], [misfire_policy], [status], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'1', N'ryTask', N'系统默认（无参）', N'ryNoParams', N'', N'0/10 * * * * ?', N'0', N'1', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'');
GO
INSERT INTO [dbo].[sys_job] ([job_id], [job_name], [job_group], [method_name], [method_params], [cron_expression], [misfire_policy], [status], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'2', N'ryTask', N'系统默认（有参）', N'ryParams', N'ry', N'0/20 * * * * ?', N'0', N'1', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'');
GO
SET IDENTITY_INSERT [dbo].[sys_job] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[sys_job_log]
-- ----------------------------
DROP TABLE [dbo].[sys_job_log]
GO
CREATE TABLE [dbo].[sys_job_log] (
[job_log_id] bigint NOT NULL IDENTITY(1,1) ,
[job_name] varchar(64) NOT NULL DEFAULT '' ,
[job_group] varchar(64) NOT NULL DEFAULT '' ,
[method_name] varchar(500) NULL DEFAULT '' ,
[method_params] varchar(200) NULL DEFAULT '' ,
[job_message] varchar(500) NULL DEFAULT '' ,
[status] varchar(1) NULL DEFAULT ((0)) ,
[exception_info] varchar(MAX) NULL DEFAULT '' ,
[create_time] datetime NULL DEFAULT (getdate()) 
)


GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_job_log', 
NULL, NULL)) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'定时任务调度日志表'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_job_log'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'定时任务调度日志表'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_job_log'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_job_log', 
'COLUMN', N'job_log_id')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'任务日志ID'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_job_log'
, @level2type = 'COLUMN', @level2name = N'job_log_id'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'任务日志ID'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_job_log'
, @level2type = 'COLUMN', @level2name = N'job_log_id'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_job_log', 
'COLUMN', N'job_name')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'任务名称'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_job_log'
, @level2type = 'COLUMN', @level2name = N'job_name'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'任务名称'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_job_log'
, @level2type = 'COLUMN', @level2name = N'job_name'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_job_log', 
'COLUMN', N'job_group')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'任务组名'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_job_log'
, @level2type = 'COLUMN', @level2name = N'job_group'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'任务组名'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_job_log'
, @level2type = 'COLUMN', @level2name = N'job_group'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_job_log', 
'COLUMN', N'method_name')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'任务方法'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_job_log'
, @level2type = 'COLUMN', @level2name = N'method_name'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'任务方法'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_job_log'
, @level2type = 'COLUMN', @level2name = N'method_name'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_job_log', 
'COLUMN', N'method_params')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'方法参数'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_job_log'
, @level2type = 'COLUMN', @level2name = N'method_params'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'方法参数'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_job_log'
, @level2type = 'COLUMN', @level2name = N'method_params'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_job_log', 
'COLUMN', N'job_message')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'日志信息'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_job_log'
, @level2type = 'COLUMN', @level2name = N'job_message'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'日志信息'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_job_log'
, @level2type = 'COLUMN', @level2name = N'job_message'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_job_log', 
'COLUMN', N'status')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'执行状态（0正常 1失败）'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_job_log'
, @level2type = 'COLUMN', @level2name = N'status'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'执行状态（0正常 1失败）'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_job_log'
, @level2type = 'COLUMN', @level2name = N'status'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_job_log', 
'COLUMN', N'exception_info')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'异常信息'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_job_log'
, @level2type = 'COLUMN', @level2name = N'exception_info'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'异常信息'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_job_log'
, @level2type = 'COLUMN', @level2name = N'exception_info'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_job_log', 
'COLUMN', N'create_time')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'创建时间'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_job_log'
, @level2type = 'COLUMN', @level2name = N'create_time'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'创建时间'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_job_log'
, @level2type = 'COLUMN', @level2name = N'create_time'
GO

-- ----------------------------
-- Records of sys_job_log
-- ----------------------------
SET IDENTITY_INSERT [dbo].[sys_job_log] ON
GO
SET IDENTITY_INSERT [dbo].[sys_job_log] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[sys_logininfor]
-- ----------------------------
DROP TABLE [dbo].[sys_logininfor]
GO
CREATE TABLE [dbo].[sys_logininfor] (
[info_id] bigint NOT NULL IDENTITY(1,1) ,
[login_name] varchar(50) NULL DEFAULT '' ,
[ipaddr] varchar(50) NULL DEFAULT '' ,
[login_location] varchar(255) NULL DEFAULT '' ,
[browser] varchar(50) NULL DEFAULT '' ,
[os] varchar(50) NULL DEFAULT '' ,
[status] varchar(1) NULL DEFAULT ((0)) ,
[msg] varchar(255) NULL DEFAULT '' ,
[login_time] datetime NULL DEFAULT (getdate()) 
)


GO
DBCC CHECKIDENT(N'[dbo].[sys_logininfor]', RESEED, 131)
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_logininfor', 
NULL, NULL)) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'系统访问记录'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_logininfor'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'系统访问记录'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_logininfor'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_logininfor', 
'COLUMN', N'info_id')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'访问ID'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_logininfor'
, @level2type = 'COLUMN', @level2name = N'info_id'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'访问ID'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_logininfor'
, @level2type = 'COLUMN', @level2name = N'info_id'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_logininfor', 
'COLUMN', N'login_name')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'登录账号'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_logininfor'
, @level2type = 'COLUMN', @level2name = N'login_name'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'登录账号'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_logininfor'
, @level2type = 'COLUMN', @level2name = N'login_name'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_logininfor', 
'COLUMN', N'ipaddr')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'登录IP地址'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_logininfor'
, @level2type = 'COLUMN', @level2name = N'ipaddr'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'登录IP地址'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_logininfor'
, @level2type = 'COLUMN', @level2name = N'ipaddr'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_logininfor', 
'COLUMN', N'login_location')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'登录地点'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_logininfor'
, @level2type = 'COLUMN', @level2name = N'login_location'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'登录地点'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_logininfor'
, @level2type = 'COLUMN', @level2name = N'login_location'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_logininfor', 
'COLUMN', N'browser')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'浏览器类型'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_logininfor'
, @level2type = 'COLUMN', @level2name = N'browser'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'浏览器类型'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_logininfor'
, @level2type = 'COLUMN', @level2name = N'browser'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_logininfor', 
'COLUMN', N'os')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'操作系统'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_logininfor'
, @level2type = 'COLUMN', @level2name = N'os'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'操作系统'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_logininfor'
, @level2type = 'COLUMN', @level2name = N'os'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_logininfor', 
'COLUMN', N'status')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'登录状态（0成功 1失败）'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_logininfor'
, @level2type = 'COLUMN', @level2name = N'status'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'登录状态（0成功 1失败）'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_logininfor'
, @level2type = 'COLUMN', @level2name = N'status'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_logininfor', 
'COLUMN', N'msg')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'提示消息'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_logininfor'
, @level2type = 'COLUMN', @level2name = N'msg'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'提示消息'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_logininfor'
, @level2type = 'COLUMN', @level2name = N'msg'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_logininfor', 
'COLUMN', N'login_time')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'访问时间'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_logininfor'
, @level2type = 'COLUMN', @level2name = N'login_time'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'访问时间'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_logininfor'
, @level2type = 'COLUMN', @level2name = N'login_time'
GO

-- ----------------------------
-- Records of sys_logininfor
-- ----------------------------
SET IDENTITY_INSERT [dbo].[sys_logininfor] ON
GO
INSERT INTO [dbo].[sys_logininfor] ([info_id], [login_name], [ipaddr], [login_location], [browser], [os], [status], [msg], [login_time]) VALUES (N'108', N'admin', N'127.0.0.1', N'XX XX', N'Chrome', N'Windows 7', N'0', N'登录成功', N'2018-09-07 17:08:01.177');
GO
INSERT INTO [dbo].[sys_logininfor] ([info_id], [login_name], [ipaddr], [login_location], [browser], [os], [status], [msg], [login_time]) VALUES (N'109', N'admin', N'127.0.0.1', N'XX XX', N'Chrome', N'Windows 7', N'0', N'登录成功', N'2018-09-10 09:01:16.273');
GO
INSERT INTO [dbo].[sys_logininfor] ([info_id], [login_name], [ipaddr], [login_location], [browser], [os], [status], [msg], [login_time]) VALUES (N'110', N'admin', N'127.0.0.1', N'XX XX', N'Chrome', N'Windows 7', N'0', N'登录成功', N'2018-09-10 09:06:13.300');
GO
INSERT INTO [dbo].[sys_logininfor] ([info_id], [login_name], [ipaddr], [login_location], [browser], [os], [status], [msg], [login_time]) VALUES (N'111', N'admin', N'127.0.0.1', N'XX XX', N'Chrome', N'Windows 7', N'0', N'登录成功', N'2018-09-10 09:15:10.870');
GO
INSERT INTO [dbo].[sys_logininfor] ([info_id], [login_name], [ipaddr], [login_location], [browser], [os], [status], [msg], [login_time]) VALUES (N'112', N'admin', N'127.0.0.1', N'XX XX', N'Chrome', N'Windows 7', N'0', N'登录成功', N'2018-09-10 09:18:13.500');
GO
INSERT INTO [dbo].[sys_logininfor] ([info_id], [login_name], [ipaddr], [login_location], [browser], [os], [status], [msg], [login_time]) VALUES (N'113', N'admin', N'127.0.0.1', N'XX XX', N'Chrome', N'Windows 7', N'0', N'登录成功', N'2018-09-10 09:19:12.570');
GO
INSERT INTO [dbo].[sys_logininfor] ([info_id], [login_name], [ipaddr], [login_location], [browser], [os], [status], [msg], [login_time]) VALUES (N'114', N'admin', N'127.0.0.1', N'XX XX', N'Chrome', N'Windows 7', N'0', N'登录成功', N'2018-09-10 09:20:30.570');
GO
INSERT INTO [dbo].[sys_logininfor] ([info_id], [login_name], [ipaddr], [login_location], [browser], [os], [status], [msg], [login_time]) VALUES (N'115', N'admin', N'127.0.0.1', N'XX XX', N'Chrome', N'Windows 7', N'0', N'登录成功', N'2018-09-10 09:22:53.387');
GO
INSERT INTO [dbo].[sys_logininfor] ([info_id], [login_name], [ipaddr], [login_location], [browser], [os], [status], [msg], [login_time]) VALUES (N'116', N'admin', N'127.0.0.1', N'XX XX', N'Chrome', N'Windows 7', N'0', N'登录成功', N'2018-09-10 09:29:02.550');
GO
INSERT INTO [dbo].[sys_logininfor] ([info_id], [login_name], [ipaddr], [login_location], [browser], [os], [status], [msg], [login_time]) VALUES (N'117', N'admin', N'127.0.0.1', N'XX XX', N'Chrome', N'Windows 7', N'0', N'退出成功', N'2018-09-10 09:29:46.300');
GO
INSERT INTO [dbo].[sys_logininfor] ([info_id], [login_name], [ipaddr], [login_location], [browser], [os], [status], [msg], [login_time]) VALUES (N'118', N'admin', N'127.0.0.1', N'XX XX', N'Chrome', N'Windows 7', N'0', N'登录成功', N'2018-09-10 09:29:47.487');
GO
INSERT INTO [dbo].[sys_logininfor] ([info_id], [login_name], [ipaddr], [login_location], [browser], [os], [status], [msg], [login_time]) VALUES (N'119', N'admin', N'127.0.0.1', N'XX XX', N'Chrome', N'Windows 7', N'0', N'登录成功', N'2018-09-10 09:36:18.100');
GO
INSERT INTO [dbo].[sys_logininfor] ([info_id], [login_name], [ipaddr], [login_location], [browser], [os], [status], [msg], [login_time]) VALUES (N'120', N'admin', N'127.0.0.1', N'XX XX', N'Chrome', N'Windows 7', N'0', N'登录成功', N'2018-09-10 09:40:40.697');
GO
INSERT INTO [dbo].[sys_logininfor] ([info_id], [login_name], [ipaddr], [login_location], [browser], [os], [status], [msg], [login_time]) VALUES (N'121', N'admin', N'127.0.0.1', N'XX XX', N'Chrome', N'Windows 7', N'0', N'登录成功', N'2018-09-10 09:52:43.930');
GO
INSERT INTO [dbo].[sys_logininfor] ([info_id], [login_name], [ipaddr], [login_location], [browser], [os], [status], [msg], [login_time]) VALUES (N'122', N'admin', N'127.0.0.1', N'XX XX', N'Chrome', N'Windows 7', N'0', N'登录成功', N'2018-09-10 10:10:50.463');
GO
INSERT INTO [dbo].[sys_logininfor] ([info_id], [login_name], [ipaddr], [login_location], [browser], [os], [status], [msg], [login_time]) VALUES (N'123', N'admin', N'127.0.0.1', N'XX XX', N'Chrome', N'Windows 7', N'0', N'登录成功', N'2018-09-10 10:19:26.210');
GO
INSERT INTO [dbo].[sys_logininfor] ([info_id], [login_name], [ipaddr], [login_location], [browser], [os], [status], [msg], [login_time]) VALUES (N'124', N'admin', N'127.0.0.1', N'XX XX', N'Chrome', N'Windows 7', N'0', N'登录成功', N'2018-09-10 10:29:32.857');
GO
INSERT INTO [dbo].[sys_logininfor] ([info_id], [login_name], [ipaddr], [login_location], [browser], [os], [status], [msg], [login_time]) VALUES (N'125', N'admin', N'127.0.0.1', N'XX XX', N'Chrome', N'Windows 7', N'0', N'登录成功', N'2018-09-10 10:35:40.333');
GO
INSERT INTO [dbo].[sys_logininfor] ([info_id], [login_name], [ipaddr], [login_location], [browser], [os], [status], [msg], [login_time]) VALUES (N'126', N'admin', N'127.0.0.1', N'XX XX', N'Chrome', N'Windows 7', N'0', N'登录成功', N'2018-09-10 10:39:39.673');
GO
INSERT INTO [dbo].[sys_logininfor] ([info_id], [login_name], [ipaddr], [login_location], [browser], [os], [status], [msg], [login_time]) VALUES (N'127', N'admin', N'127.0.0.1', N'XX XX', N'Chrome', N'Windows 7', N'0', N'登录成功', N'2018-09-10 10:40:20.263');
GO
INSERT INTO [dbo].[sys_logininfor] ([info_id], [login_name], [ipaddr], [login_location], [browser], [os], [status], [msg], [login_time]) VALUES (N'128', N'admin', N'127.0.0.1', N'XX XX', N'Chrome', N'Windows 7', N'0', N'登录成功', N'2018-09-10 11:27:49.470');
GO
INSERT INTO [dbo].[sys_logininfor] ([info_id], [login_name], [ipaddr], [login_location], [browser], [os], [status], [msg], [login_time]) VALUES (N'129', N'admin', N'127.0.0.1', N'XX XX', N'Chrome', N'Windows 7', N'0', N'登录成功', N'2018-09-10 11:33:14.207');
GO
INSERT INTO [dbo].[sys_logininfor] ([info_id], [login_name], [ipaddr], [login_location], [browser], [os], [status], [msg], [login_time]) VALUES (N'130', N'admin', N'127.0.0.1', N'XX XX', N'Chrome', N'Windows 7', N'0', N'退出成功', N'2018-09-10 11:35:02.653');
GO
INSERT INTO [dbo].[sys_logininfor] ([info_id], [login_name], [ipaddr], [login_location], [browser], [os], [status], [msg], [login_time]) VALUES (N'131', N'admin', N'127.0.0.1', N'XX XX', N'Chrome', N'Windows 7', N'0', N'登录成功', N'2018-09-10 11:35:04.430');
GO
SET IDENTITY_INSERT [dbo].[sys_logininfor] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[sys_menu]
-- ----------------------------
DROP TABLE [dbo].[sys_menu]
GO
CREATE TABLE [dbo].[sys_menu] (
[menu_id] bigint NOT NULL IDENTITY(1,1) ,
[menu_name] varchar(50) NOT NULL DEFAULT '' ,
[parent_id] bigint NULL DEFAULT ((0)) ,
[order_num] bigint NULL DEFAULT ((0)) ,
[url] varchar(200) NULL DEFAULT (N'#') ,
[menu_type] varchar(1) NULL DEFAULT ((0)) ,
[visible] varchar(1) NULL DEFAULT ((0)) ,
[perms] varchar(100) NULL DEFAULT '' ,
[icon] varchar(100) NULL DEFAULT '' ,
[create_by] varchar(64) NULL DEFAULT '' ,
[create_time] datetime NULL DEFAULT (getdate()) ,
[update_by] varchar(64) NULL DEFAULT '' ,
[update_time] datetime NULL DEFAULT (getdate()) ,
[remark] varchar(500) NULL DEFAULT '' 
)


GO
DBCC CHECKIDENT(N'[dbo].[sys_menu]', RESEED, 1062)
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_menu', 
NULL, NULL)) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'菜单权限表'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_menu'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'菜单权限表'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_menu'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_menu', 
'COLUMN', N'menu_id')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'菜单ID'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_menu'
, @level2type = 'COLUMN', @level2name = N'menu_id'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'菜单ID'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_menu'
, @level2type = 'COLUMN', @level2name = N'menu_id'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_menu', 
'COLUMN', N'menu_name')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'菜单名称'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_menu'
, @level2type = 'COLUMN', @level2name = N'menu_name'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'菜单名称'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_menu'
, @level2type = 'COLUMN', @level2name = N'menu_name'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_menu', 
'COLUMN', N'parent_id')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'父菜单ID'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_menu'
, @level2type = 'COLUMN', @level2name = N'parent_id'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'父菜单ID'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_menu'
, @level2type = 'COLUMN', @level2name = N'parent_id'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_menu', 
'COLUMN', N'order_num')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'显示顺序'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_menu'
, @level2type = 'COLUMN', @level2name = N'order_num'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'显示顺序'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_menu'
, @level2type = 'COLUMN', @level2name = N'order_num'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_menu', 
'COLUMN', N'url')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'请求地址'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_menu'
, @level2type = 'COLUMN', @level2name = N'url'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'请求地址'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_menu'
, @level2type = 'COLUMN', @level2name = N'url'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_menu', 
'COLUMN', N'menu_type')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'菜单类型（M目录 C菜单 F按钮）'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_menu'
, @level2type = 'COLUMN', @level2name = N'menu_type'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'菜单类型（M目录 C菜单 F按钮）'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_menu'
, @level2type = 'COLUMN', @level2name = N'menu_type'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_menu', 
'COLUMN', N'visible')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'菜单状态（0显示 1隐藏）'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_menu'
, @level2type = 'COLUMN', @level2name = N'visible'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'菜单状态（0显示 1隐藏）'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_menu'
, @level2type = 'COLUMN', @level2name = N'visible'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_menu', 
'COLUMN', N'perms')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'权限标识'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_menu'
, @level2type = 'COLUMN', @level2name = N'perms'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'权限标识'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_menu'
, @level2type = 'COLUMN', @level2name = N'perms'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_menu', 
'COLUMN', N'icon')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'菜单图标'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_menu'
, @level2type = 'COLUMN', @level2name = N'icon'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'菜单图标'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_menu'
, @level2type = 'COLUMN', @level2name = N'icon'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_menu', 
'COLUMN', N'create_by')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'创建者'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_menu'
, @level2type = 'COLUMN', @level2name = N'create_by'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'创建者'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_menu'
, @level2type = 'COLUMN', @level2name = N'create_by'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_menu', 
'COLUMN', N'create_time')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'创建时间'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_menu'
, @level2type = 'COLUMN', @level2name = N'create_time'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'创建时间'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_menu'
, @level2type = 'COLUMN', @level2name = N'create_time'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_menu', 
'COLUMN', N'update_by')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'更新者'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_menu'
, @level2type = 'COLUMN', @level2name = N'update_by'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'更新者'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_menu'
, @level2type = 'COLUMN', @level2name = N'update_by'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_menu', 
'COLUMN', N'update_time')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'更新时间'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_menu'
, @level2type = 'COLUMN', @level2name = N'update_time'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'更新时间'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_menu'
, @level2type = 'COLUMN', @level2name = N'update_time'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_menu', 
'COLUMN', N'remark')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'备注'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_menu'
, @level2type = 'COLUMN', @level2name = N'remark'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'备注'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_menu'
, @level2type = 'COLUMN', @level2name = N'remark'
GO

-- ----------------------------
-- Records of sys_menu
-- ----------------------------
SET IDENTITY_INSERT [dbo].[sys_menu] ON
GO
INSERT INTO [dbo].[sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [url], [menu_type], [visible], [perms], [icon], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'1', N'系统管理', N'0', N'1', N'#', N'M', N'0', N'', N'fa fa-gear', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'系统管理目录');
GO
INSERT INTO [dbo].[sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [url], [menu_type], [visible], [perms], [icon], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'2', N'系统监控', N'0', N'2', N'#', N'M', N'0', N'', N'fa fa-video-camera', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'系统监控目录');
GO
INSERT INTO [dbo].[sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [url], [menu_type], [visible], [perms], [icon], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'3', N'系统工具', N'0', N'3', N'#', N'M', N'0', N'', N'fa fa-bars', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'系统工具目录');
GO
INSERT INTO [dbo].[sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [url], [menu_type], [visible], [perms], [icon], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'100', N'用户管理', N'1', N'1', N'/system/user', N'C', N'0', N'system:user:view', N'#', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'用户管理菜单');
GO
INSERT INTO [dbo].[sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [url], [menu_type], [visible], [perms], [icon], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'101', N'角色管理', N'1', N'2', N'/system/role', N'C', N'0', N'system:role:view', N'#', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'角色管理菜单');
GO
INSERT INTO [dbo].[sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [url], [menu_type], [visible], [perms], [icon], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'102', N'菜单管理', N'1', N'3', N'/system/menu', N'C', N'0', N'system:menu:view', N'#', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'菜单管理菜单');
GO
INSERT INTO [dbo].[sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [url], [menu_type], [visible], [perms], [icon], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'103', N'部门管理', N'1', N'4', N'/system/dept', N'C', N'0', N'system:dept:view', N'#', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'部门管理菜单');
GO
INSERT INTO [dbo].[sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [url], [menu_type], [visible], [perms], [icon], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'104', N'岗位管理', N'1', N'5', N'/system/post', N'C', N'0', N'system:post:view', N'#', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'岗位管理菜单');
GO
INSERT INTO [dbo].[sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [url], [menu_type], [visible], [perms], [icon], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'105', N'字典管理', N'1', N'6', N'/system/dict', N'C', N'0', N'system:dict:view', N'#', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'字典管理菜单');
GO
INSERT INTO [dbo].[sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [url], [menu_type], [visible], [perms], [icon], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'106', N'参数设置', N'1', N'7', N'/system/config', N'C', N'0', N'system:config:view', N'#', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'参数设置菜单');
GO
INSERT INTO [dbo].[sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [url], [menu_type], [visible], [perms], [icon], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'107', N'通知公告', N'1', N'8', N'/system/notice', N'C', N'0', N'system:notice:view', N'#', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'通知公告菜单');
GO
INSERT INTO [dbo].[sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [url], [menu_type], [visible], [perms], [icon], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'108', N'日志管理', N'1', N'9', N'#', N'M', N'0', N'', N'#', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'日志管理菜单');
GO
INSERT INTO [dbo].[sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [url], [menu_type], [visible], [perms], [icon], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'109', N'在线用户', N'2', N'1', N'/monitor/online', N'C', N'0', N'monitor:online:view', N'#', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'在线用户菜单');
GO
INSERT INTO [dbo].[sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [url], [menu_type], [visible], [perms], [icon], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'110', N'定时任务', N'2', N'2', N'/monitor/job', N'C', N'0', N'monitor:job:view', N'#', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'定时任务菜单');
GO
INSERT INTO [dbo].[sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [url], [menu_type], [visible], [perms], [icon], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'111', N'数据监控', N'2', N'3', N'/monitor/data', N'C', N'0', N'monitor:data:view', N'#', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'数据监控菜单');
GO
INSERT INTO [dbo].[sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [url], [menu_type], [visible], [perms], [icon], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'112', N'表单构建', N'3', N'1', N'/tool/build', N'C', N'0', N'tool:build:view', N'#', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'表单构建菜单');
GO
INSERT INTO [dbo].[sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [url], [menu_type], [visible], [perms], [icon], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'113', N'代码生成', N'3', N'2', N'/tool/gen', N'C', N'0', N'tool:gen:view', N'#', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'代码生成菜单');
GO
INSERT INTO [dbo].[sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [url], [menu_type], [visible], [perms], [icon], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'114', N'系统接口', N'3', N'3', N'/tool/swagger', N'C', N'0', N'tool:swagger:view', N'#', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'系统接口菜单');
GO
INSERT INTO [dbo].[sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [url], [menu_type], [visible], [perms], [icon], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'500', N'操作日志', N'108', N'1', N'/monitor/operlog', N'C', N'0', N'monitor:operlog:view', N'#', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'操作日志菜单');
GO
INSERT INTO [dbo].[sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [url], [menu_type], [visible], [perms], [icon], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'501', N'登录日志', N'108', N'2', N'/monitor/logininfor', N'C', N'0', N'monitor:logininfor:view', N'#', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'登录日志菜单');
GO
INSERT INTO [dbo].[sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [url], [menu_type], [visible], [perms], [icon], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'1000', N'用户查询', N'100', N'1', N'#', N'F', N'0', N'system:user:list', N'#', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'');
GO
INSERT INTO [dbo].[sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [url], [menu_type], [visible], [perms], [icon], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'1001', N'用户新增', N'100', N'2', N'#', N'F', N'0', N'system:user:add', N'#', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'');
GO
INSERT INTO [dbo].[sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [url], [menu_type], [visible], [perms], [icon], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'1002', N'用户修改', N'100', N'3', N'#', N'F', N'0', N'system:user:edit', N'#', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'');
GO
INSERT INTO [dbo].[sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [url], [menu_type], [visible], [perms], [icon], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'1003', N'用户删除', N'100', N'4', N'#', N'F', N'0', N'system:user:remove', N'#', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'');
GO
INSERT INTO [dbo].[sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [url], [menu_type], [visible], [perms], [icon], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'1004', N'用户导出', N'100', N'5', N'#', N'F', N'0', N'system:user:export', N'#', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'');
GO
INSERT INTO [dbo].[sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [url], [menu_type], [visible], [perms], [icon], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'1005', N'重置密码', N'100', N'5', N'#', N'F', N'0', N'system:user:resetPwd', N'#', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'');
GO
INSERT INTO [dbo].[sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [url], [menu_type], [visible], [perms], [icon], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'1006', N'角色查询', N'101', N'1', N'#', N'F', N'0', N'system:role:list', N'#', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'');
GO
INSERT INTO [dbo].[sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [url], [menu_type], [visible], [perms], [icon], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'1007', N'角色新增', N'101', N'2', N'#', N'F', N'0', N'system:role:add', N'#', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'');
GO
INSERT INTO [dbo].[sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [url], [menu_type], [visible], [perms], [icon], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'1008', N'角色修改', N'101', N'3', N'#', N'F', N'0', N'system:role:edit', N'#', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'');
GO
INSERT INTO [dbo].[sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [url], [menu_type], [visible], [perms], [icon], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'1009', N'角色删除', N'101', N'4', N'#', N'F', N'0', N'system:role:remove', N'#', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'');
GO
INSERT INTO [dbo].[sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [url], [menu_type], [visible], [perms], [icon], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'1010', N'角色导出', N'101', N'4', N'#', N'F', N'0', N'system:role:export', N'#', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'');
GO
INSERT INTO [dbo].[sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [url], [menu_type], [visible], [perms], [icon], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'1011', N'菜单查询', N'102', N'1', N'#', N'F', N'0', N'system:menu:list', N'#', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'');
GO
INSERT INTO [dbo].[sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [url], [menu_type], [visible], [perms], [icon], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'1012', N'菜单新增', N'102', N'2', N'#', N'F', N'0', N'system:menu:add', N'#', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'');
GO
INSERT INTO [dbo].[sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [url], [menu_type], [visible], [perms], [icon], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'1013', N'菜单修改', N'102', N'3', N'#', N'F', N'0', N'system:menu:edit', N'#', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'');
GO
INSERT INTO [dbo].[sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [url], [menu_type], [visible], [perms], [icon], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'1014', N'菜单删除', N'102', N'4', N'#', N'F', N'0', N'system:menu:remove', N'#', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'');
GO
INSERT INTO [dbo].[sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [url], [menu_type], [visible], [perms], [icon], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'1015', N'部门查询', N'103', N'1', N'#', N'F', N'0', N'system:dept:list', N'#', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'');
GO
INSERT INTO [dbo].[sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [url], [menu_type], [visible], [perms], [icon], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'1016', N'部门新增', N'103', N'2', N'#', N'F', N'0', N'system:dept:add', N'#', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'');
GO
INSERT INTO [dbo].[sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [url], [menu_type], [visible], [perms], [icon], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'1017', N'部门修改', N'103', N'3', N'#', N'F', N'0', N'system:dept:edit', N'#', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'');
GO
INSERT INTO [dbo].[sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [url], [menu_type], [visible], [perms], [icon], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'1018', N'部门删除', N'103', N'4', N'#', N'F', N'0', N'system:dept:remove', N'#', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'');
GO
INSERT INTO [dbo].[sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [url], [menu_type], [visible], [perms], [icon], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'1019', N'岗位查询', N'104', N'1', N'#', N'F', N'0', N'system:post:list', N'#', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'');
GO
INSERT INTO [dbo].[sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [url], [menu_type], [visible], [perms], [icon], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'1020', N'岗位新增', N'104', N'2', N'#', N'F', N'0', N'system:post:add', N'#', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'');
GO
INSERT INTO [dbo].[sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [url], [menu_type], [visible], [perms], [icon], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'1021', N'岗位修改', N'104', N'3', N'#', N'F', N'0', N'system:post:edit', N'#', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'');
GO
INSERT INTO [dbo].[sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [url], [menu_type], [visible], [perms], [icon], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'1022', N'岗位删除', N'104', N'4', N'#', N'F', N'0', N'system:post:remove', N'#', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'');
GO
INSERT INTO [dbo].[sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [url], [menu_type], [visible], [perms], [icon], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'1023', N'岗位导出', N'104', N'4', N'#', N'F', N'0', N'system:post:export', N'#', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'');
GO
INSERT INTO [dbo].[sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [url], [menu_type], [visible], [perms], [icon], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'1024', N'字典查询', N'105', N'1', N'#', N'F', N'0', N'system:dict:list', N'#', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'');
GO
INSERT INTO [dbo].[sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [url], [menu_type], [visible], [perms], [icon], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'1025', N'字典新增', N'105', N'2', N'#', N'F', N'0', N'system:dict:add', N'#', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'');
GO
INSERT INTO [dbo].[sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [url], [menu_type], [visible], [perms], [icon], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'1026', N'字典修改', N'105', N'3', N'#', N'F', N'0', N'system:dict:edit', N'#', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'');
GO
INSERT INTO [dbo].[sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [url], [menu_type], [visible], [perms], [icon], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'1027', N'字典删除', N'105', N'4', N'#', N'F', N'0', N'system:dict:remove', N'#', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'');
GO
INSERT INTO [dbo].[sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [url], [menu_type], [visible], [perms], [icon], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'1028', N'字典导出', N'105', N'4', N'#', N'F', N'0', N'system:dict:export', N'#', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'');
GO
INSERT INTO [dbo].[sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [url], [menu_type], [visible], [perms], [icon], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'1029', N'参数查询', N'106', N'1', N'#', N'F', N'0', N'system:config:list', N'#', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'');
GO
INSERT INTO [dbo].[sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [url], [menu_type], [visible], [perms], [icon], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'1030', N'参数新增', N'106', N'2', N'#', N'F', N'0', N'system:config:add', N'#', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'');
GO
INSERT INTO [dbo].[sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [url], [menu_type], [visible], [perms], [icon], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'1031', N'参数修改', N'106', N'3', N'#', N'F', N'0', N'system:config:edit', N'#', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'');
GO
INSERT INTO [dbo].[sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [url], [menu_type], [visible], [perms], [icon], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'1032', N'参数删除', N'106', N'4', N'#', N'F', N'0', N'system:config:remove', N'#', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'');
GO
INSERT INTO [dbo].[sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [url], [menu_type], [visible], [perms], [icon], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'1033', N'参数导出', N'106', N'4', N'#', N'F', N'0', N'system:config:export', N'#', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'');
GO
INSERT INTO [dbo].[sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [url], [menu_type], [visible], [perms], [icon], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'1034', N'公告查询', N'107', N'1', N'#', N'F', N'0', N'system:notice:list', N'#', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'');
GO
INSERT INTO [dbo].[sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [url], [menu_type], [visible], [perms], [icon], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'1035', N'公告新增', N'107', N'2', N'#', N'F', N'0', N'system:notice:add', N'#', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'');
GO
INSERT INTO [dbo].[sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [url], [menu_type], [visible], [perms], [icon], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'1036', N'公告修改', N'107', N'3', N'#', N'F', N'0', N'system:notice:edit', N'#', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'');
GO
INSERT INTO [dbo].[sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [url], [menu_type], [visible], [perms], [icon], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'1037', N'公告删除', N'107', N'4', N'#', N'F', N'0', N'system:notice:remove', N'#', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'');
GO
INSERT INTO [dbo].[sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [url], [menu_type], [visible], [perms], [icon], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'1038', N'操作查询', N'500', N'1', N'#', N'F', N'0', N'monitor:operlog:list', N'#', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'');
GO
INSERT INTO [dbo].[sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [url], [menu_type], [visible], [perms], [icon], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'1039', N'操作删除', N'500', N'2', N'#', N'F', N'0', N'monitor:operlog:remove', N'#', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'');
GO
INSERT INTO [dbo].[sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [url], [menu_type], [visible], [perms], [icon], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'1040', N'详细信息', N'500', N'3', N'#', N'F', N'0', N'monitor:operlog:detail', N'#', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'');
GO
INSERT INTO [dbo].[sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [url], [menu_type], [visible], [perms], [icon], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'1041', N'日志导出', N'500', N'3', N'#', N'F', N'0', N'monitor:operlog:export', N'#', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'');
GO
INSERT INTO [dbo].[sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [url], [menu_type], [visible], [perms], [icon], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'1042', N'登录查询', N'501', N'1', N'#', N'F', N'0', N'monitor:logininfor:list', N'#', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'');
GO
INSERT INTO [dbo].[sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [url], [menu_type], [visible], [perms], [icon], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'1043', N'登录删除', N'501', N'2', N'#', N'F', N'0', N'monitor:logininfor:remove', N'#', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'');
GO
INSERT INTO [dbo].[sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [url], [menu_type], [visible], [perms], [icon], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'1044', N'日志导出', N'501', N'2', N'#', N'F', N'0', N'monitor:logininfor:export', N'#', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'');
GO
INSERT INTO [dbo].[sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [url], [menu_type], [visible], [perms], [icon], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'1045', N'在线查询', N'109', N'1', N'#', N'F', N'0', N'monitor:online:list', N'#', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'');
GO
INSERT INTO [dbo].[sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [url], [menu_type], [visible], [perms], [icon], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'1046', N'批量强退', N'109', N'2', N'#', N'F', N'0', N'monitor:online:batchForceLogout', N'#', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'');
GO
INSERT INTO [dbo].[sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [url], [menu_type], [visible], [perms], [icon], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'1047', N'单条强退', N'109', N'3', N'#', N'F', N'0', N'monitor:online:forceLogout', N'#', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'');
GO
INSERT INTO [dbo].[sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [url], [menu_type], [visible], [perms], [icon], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'1048', N'任务查询', N'110', N'1', N'#', N'F', N'0', N'monitor:job:list', N'#', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'');
GO
INSERT INTO [dbo].[sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [url], [menu_type], [visible], [perms], [icon], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'1049', N'任务新增', N'110', N'2', N'#', N'F', N'0', N'monitor:job:add', N'#', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'');
GO
INSERT INTO [dbo].[sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [url], [menu_type], [visible], [perms], [icon], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'1050', N'任务修改', N'110', N'3', N'#', N'F', N'0', N'monitor:job:edit', N'#', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'');
GO
INSERT INTO [dbo].[sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [url], [menu_type], [visible], [perms], [icon], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'1051', N'任务删除', N'110', N'4', N'#', N'F', N'0', N'monitor:job:remove', N'#', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'');
GO
INSERT INTO [dbo].[sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [url], [menu_type], [visible], [perms], [icon], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'1052', N'状态修改', N'110', N'5', N'#', N'F', N'0', N'monitor:job:changeStatus', N'#', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'');
GO
INSERT INTO [dbo].[sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [url], [menu_type], [visible], [perms], [icon], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'1053', N'任务导出', N'110', N'5', N'#', N'F', N'0', N'monitor:job:export', N'#', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'');
GO
INSERT INTO [dbo].[sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [url], [menu_type], [visible], [perms], [icon], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'1054', N'生成查询', N'113', N'1', N'#', N'F', N'0', N'tool:gen:list', N'#', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'');
GO
INSERT INTO [dbo].[sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [url], [menu_type], [visible], [perms], [icon], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'1055', N'生成代码', N'113', N'2', N'#', N'F', N'0', N'tool:gen:code', N'#', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'');
GO
INSERT INTO [dbo].[sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [url], [menu_type], [visible], [perms], [icon], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'1056', N'测试项目', N'0', N'4', N'#', N'M', N'0', N'', N'fa fa-address-book-o', N'admin', N'2018-09-10 09:57:07.340', N'', N'2018-09-10 09:57:07.340', N'');
GO
INSERT INTO [dbo].[sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [url], [menu_type], [visible], [perms], [icon], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'1057', N'行政单位', N'1056', N'1', N'/module/xzdept', N'C', N'0', N'module:xzdept:view', N'#', N'admin', N'2018-03-01 00:00:00.000', N'ry', N'2018-03-01 00:00:00.000', N'行政单位菜单');
GO
INSERT INTO [dbo].[sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [url], [menu_type], [visible], [perms], [icon], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'1058', N'行政单位查询', N'1057', N'1', N'#', N'F', N'0', N'module:xzdept:list', N'#', N'admin', N'2018-03-01 00:00:00.000', N'ry', N'2018-03-01 00:00:00.000', N'');
GO
INSERT INTO [dbo].[sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [url], [menu_type], [visible], [perms], [icon], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'1059', N'行政单位新增', N'1057', N'2', N'#', N'F', N'0', N'module:xzdept:add', N'#', N'admin', N'2018-03-01 00:00:00.000', N'ry', N'2018-03-01 00:00:00.000', N'');
GO
INSERT INTO [dbo].[sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [url], [menu_type], [visible], [perms], [icon], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'1060', N'行政单位修改', N'1057', N'3', N'#', N'F', N'0', N'module:xzdept:edit', N'#', N'admin', N'2018-03-01 00:00:00.000', N'ry', N'2018-03-01 00:00:00.000', N'');
GO
INSERT INTO [dbo].[sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [url], [menu_type], [visible], [perms], [icon], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'1061', N'行政单位删除', N'1057', N'4', N'#', N'F', N'0', N'module:xzdept:remove', N'#', N'admin', N'2018-03-01 00:00:00.000', N'ry', N'2018-03-01 00:00:00.000', N'');
GO
INSERT INTO [dbo].[sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [url], [menu_type], [visible], [perms], [icon], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'1062', N'行政单位导出', N'1057', N'5', N'#', N'F', N'0', N'module:xzdept:export', N'#', N'admin', N'2018-03-01 00:00:00.000', N'admin', N'2018-09-10 11:38:54.383', N'');
GO
SET IDENTITY_INSERT [dbo].[sys_menu] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[sys_notice]
-- ----------------------------
DROP TABLE [dbo].[sys_notice]
GO
CREATE TABLE [dbo].[sys_notice] (
[notice_id] bigint NOT NULL IDENTITY(1,1) ,
[notice_title] varchar(50) NOT NULL DEFAULT '' ,
[notice_type] varchar(2) NOT NULL DEFAULT '' ,
[notice_content] varchar(500) NOT NULL DEFAULT '' ,
[status] varchar(1) NULL DEFAULT ((0)) ,
[create_by] varchar(64) NULL DEFAULT '' ,
[create_time] datetime NULL DEFAULT (getdate()) ,
[update_by] varchar(64) NULL DEFAULT '' ,
[update_time] datetime NULL DEFAULT (getdate()) ,
[remark] varchar(255) NULL DEFAULT '' 
)


GO
DBCC CHECKIDENT(N'[dbo].[sys_notice]', RESEED, 2)
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_notice', 
NULL, NULL)) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'通知公告表'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_notice'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'通知公告表'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_notice'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_notice', 
'COLUMN', N'notice_id')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'公告ID'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_notice'
, @level2type = 'COLUMN', @level2name = N'notice_id'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'公告ID'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_notice'
, @level2type = 'COLUMN', @level2name = N'notice_id'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_notice', 
'COLUMN', N'notice_title')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'公告标题'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_notice'
, @level2type = 'COLUMN', @level2name = N'notice_title'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'公告标题'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_notice'
, @level2type = 'COLUMN', @level2name = N'notice_title'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_notice', 
'COLUMN', N'notice_type')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'公告类型（1通知 2公告）'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_notice'
, @level2type = 'COLUMN', @level2name = N'notice_type'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'公告类型（1通知 2公告）'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_notice'
, @level2type = 'COLUMN', @level2name = N'notice_type'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_notice', 
'COLUMN', N'notice_content')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'公告内容'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_notice'
, @level2type = 'COLUMN', @level2name = N'notice_content'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'公告内容'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_notice'
, @level2type = 'COLUMN', @level2name = N'notice_content'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_notice', 
'COLUMN', N'status')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'公告状态（0正常 1关闭）'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_notice'
, @level2type = 'COLUMN', @level2name = N'status'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'公告状态（0正常 1关闭）'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_notice'
, @level2type = 'COLUMN', @level2name = N'status'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_notice', 
'COLUMN', N'create_by')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'创建者'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_notice'
, @level2type = 'COLUMN', @level2name = N'create_by'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'创建者'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_notice'
, @level2type = 'COLUMN', @level2name = N'create_by'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_notice', 
'COLUMN', N'create_time')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'创建时间'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_notice'
, @level2type = 'COLUMN', @level2name = N'create_time'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'创建时间'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_notice'
, @level2type = 'COLUMN', @level2name = N'create_time'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_notice', 
'COLUMN', N'update_by')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'更新者'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_notice'
, @level2type = 'COLUMN', @level2name = N'update_by'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'更新者'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_notice'
, @level2type = 'COLUMN', @level2name = N'update_by'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_notice', 
'COLUMN', N'update_time')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'更新时间'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_notice'
, @level2type = 'COLUMN', @level2name = N'update_time'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'更新时间'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_notice'
, @level2type = 'COLUMN', @level2name = N'update_time'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_notice', 
'COLUMN', N'remark')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'备注'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_notice'
, @level2type = 'COLUMN', @level2name = N'remark'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'备注'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_notice'
, @level2type = 'COLUMN', @level2name = N'remark'
GO

-- ----------------------------
-- Records of sys_notice
-- ----------------------------
SET IDENTITY_INSERT [dbo].[sys_notice] ON
GO
INSERT INTO [dbo].[sys_notice] ([notice_id], [notice_title], [notice_type], [notice_content], [status], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'1', N'温馨提醒：2018-07-01 若依新版本发布啦', N'2 ', N'新版本内容', N'0', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'管理员');
GO
INSERT INTO [dbo].[sys_notice] ([notice_id], [notice_title], [notice_type], [notice_content], [status], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'2', N'维护通知：2018-07-01 若依系统凌晨维护', N'1 ', N'维护内容', N'0', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'管理员');
GO
SET IDENTITY_INSERT [dbo].[sys_notice] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[sys_oper_log]
-- ----------------------------
DROP TABLE [dbo].[sys_oper_log]
GO
CREATE TABLE [dbo].[sys_oper_log] (
[oper_id] bigint NOT NULL IDENTITY(1,1) ,
[title] varchar(50) NULL DEFAULT '' ,
[business_type] int NULL DEFAULT ((0)) ,
[method] varchar(100) NULL DEFAULT '' ,
[operator_type] int NULL DEFAULT ((0)) ,
[oper_name] varchar(50) NULL DEFAULT '' ,
[dept_name] varchar(50) NULL DEFAULT '' ,
[oper_url] varchar(255) NULL DEFAULT '' ,
[oper_ip] varchar(50) NULL DEFAULT '' ,
[oper_location] varchar(255) NULL DEFAULT '' ,
[oper_param] varchar(255) NULL DEFAULT '' ,
[status] int NULL DEFAULT ((0)) ,
[error_msg] varchar(2000) NULL DEFAULT '' ,
[oper_time] datetime NULL DEFAULT (getdate()) 
)


GO
DBCC CHECKIDENT(N'[dbo].[sys_oper_log]', RESEED, 125)
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_oper_log', 
NULL, NULL)) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'操作日志记录'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_oper_log'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'操作日志记录'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_oper_log'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_oper_log', 
'COLUMN', N'oper_id')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'日志主键'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_oper_log'
, @level2type = 'COLUMN', @level2name = N'oper_id'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'日志主键'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_oper_log'
, @level2type = 'COLUMN', @level2name = N'oper_id'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_oper_log', 
'COLUMN', N'title')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'模块标题'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_oper_log'
, @level2type = 'COLUMN', @level2name = N'title'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'模块标题'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_oper_log'
, @level2type = 'COLUMN', @level2name = N'title'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_oper_log', 
'COLUMN', N'business_type')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'业务类型（0其它 1新增 2修改 3删除）'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_oper_log'
, @level2type = 'COLUMN', @level2name = N'business_type'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'业务类型（0其它 1新增 2修改 3删除）'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_oper_log'
, @level2type = 'COLUMN', @level2name = N'business_type'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_oper_log', 
'COLUMN', N'method')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'方法名称'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_oper_log'
, @level2type = 'COLUMN', @level2name = N'method'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'方法名称'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_oper_log'
, @level2type = 'COLUMN', @level2name = N'method'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_oper_log', 
'COLUMN', N'operator_type')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'操作类别（0其它 1后台用户 2手机端用户）'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_oper_log'
, @level2type = 'COLUMN', @level2name = N'operator_type'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'操作类别（0其它 1后台用户 2手机端用户）'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_oper_log'
, @level2type = 'COLUMN', @level2name = N'operator_type'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_oper_log', 
'COLUMN', N'oper_name')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'操作人员'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_oper_log'
, @level2type = 'COLUMN', @level2name = N'oper_name'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'操作人员'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_oper_log'
, @level2type = 'COLUMN', @level2name = N'oper_name'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_oper_log', 
'COLUMN', N'dept_name')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'部门名称'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_oper_log'
, @level2type = 'COLUMN', @level2name = N'dept_name'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'部门名称'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_oper_log'
, @level2type = 'COLUMN', @level2name = N'dept_name'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_oper_log', 
'COLUMN', N'oper_url')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'请求URL'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_oper_log'
, @level2type = 'COLUMN', @level2name = N'oper_url'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'请求URL'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_oper_log'
, @level2type = 'COLUMN', @level2name = N'oper_url'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_oper_log', 
'COLUMN', N'oper_ip')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'主机地址'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_oper_log'
, @level2type = 'COLUMN', @level2name = N'oper_ip'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'主机地址'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_oper_log'
, @level2type = 'COLUMN', @level2name = N'oper_ip'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_oper_log', 
'COLUMN', N'oper_location')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'操作地点'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_oper_log'
, @level2type = 'COLUMN', @level2name = N'oper_location'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'操作地点'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_oper_log'
, @level2type = 'COLUMN', @level2name = N'oper_location'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_oper_log', 
'COLUMN', N'oper_param')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'请求参数'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_oper_log'
, @level2type = 'COLUMN', @level2name = N'oper_param'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'请求参数'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_oper_log'
, @level2type = 'COLUMN', @level2name = N'oper_param'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_oper_log', 
'COLUMN', N'status')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'操作状态（0正常 1异常）'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_oper_log'
, @level2type = 'COLUMN', @level2name = N'status'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'操作状态（0正常 1异常）'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_oper_log'
, @level2type = 'COLUMN', @level2name = N'status'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_oper_log', 
'COLUMN', N'error_msg')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'错误消息'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_oper_log'
, @level2type = 'COLUMN', @level2name = N'error_msg'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'错误消息'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_oper_log'
, @level2type = 'COLUMN', @level2name = N'error_msg'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_oper_log', 
'COLUMN', N'oper_time')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'操作时间'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_oper_log'
, @level2type = 'COLUMN', @level2name = N'oper_time'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'操作时间'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_oper_log'
, @level2type = 'COLUMN', @level2name = N'oper_time'
GO

-- ----------------------------
-- Records of sys_oper_log
-- ----------------------------
SET IDENTITY_INSERT [dbo].[sys_oper_log] ON
GO
INSERT INTO [dbo].[sys_oper_log] ([oper_id], [title], [business_type], [method], [operator_type], [oper_name], [dept_name], [oper_url], [oper_ip], [oper_location], [oper_param], [status], [error_msg], [oper_time]) VALUES (N'106', N'登陆日志', N'3', N'com.ruoyi.project.monitor.logininfor.controller.LogininforController.remove()', N'1', N'admin', N'研发部门', N'/monitor/logininfor/remove', N'127.0.0.1', N'XX XX', N'{"ids":["107,106,105,104,103,102,101,100"]}', N'0', null, N'2018-09-07 16:58:56.370');
GO
INSERT INTO [dbo].[sys_oper_log] ([oper_id], [title], [business_type], [method], [operator_type], [oper_name], [dept_name], [oper_url], [oper_ip], [oper_location], [oper_param], [status], [error_msg], [oper_time]) VALUES (N'107', N'代码生成', N'8', N'com.ruoyi.project.tool.gen.controller.GenController.genCode()', N'1', N'admin', N'研发部门', N'/tool/gen/genCode/sys_menu', N'127.0.0.1', N'XX XX', N'{}', N'0', null, N'2018-09-07 17:08:48.210');
GO
INSERT INTO [dbo].[sys_oper_log] ([oper_id], [title], [business_type], [method], [operator_type], [oper_name], [dept_name], [oper_url], [oper_ip], [oper_location], [oper_param], [status], [error_msg], [oper_time]) VALUES (N'108', N'用户管理', N'1', N'com.ruoyi.project.system.user.controller.UserController.addSave()', N'1', N'admin', N'研发部门', N'/system/user/add', N'127.0.0.1', N'XX XX', N'{"deptId":["103"],"loginName":["aaa"],"userName":["admin"],"password":["admin123"],"email":["aa@qq.com"],"phonenumber":["13978880563"],"sex":["0"],"status":["0"],"roleIds":["1,2"],"postIds":["2"]}', N'1', N'
### Error updating database.  Cause: com.microsoft.sqlserver.jdbc.SQLServerException: 不能将值 NULL 插入列 ''user_id''，表 ''ruoyi.dbo.sys_user''；列不允许有 Null 值。INSERT 失败。
### The error may involve com.project.system.user.mapper.UserMapper.insertUser-Inline
### The error occurred while setting parameters
### SQL: insert into sys_user(            dept_id,       login_name,       user_name,       email,       phonenumber,       sex,       password,       salt,       status,       create_by,            create_time    )values(            ?,       ?,       ?,       ?,       ?,       ?,       ?,       ?,       ?,       ?,          GETDATE()    )
### Cause: com.microsoft.sqlserver.jdbc.SQLServerException: 不能将值 NULL 插入列 ''user_id''，表 ''ruoyi.dbo.sys_user''；列不允许有 Null 值。INSERT 失败。
; ]; 不能将值 NULL 插入列 ''user_id''，表 ''ruoyi.dbo.sys_user''；列不允许有 Null 值。INSERT 失败。; nested exception is com.microsoft.sqlserver.jdbc.SQLServerException: 不能将值 NULL 插入列 ''user_id''，表 ''ruoyi.dbo.sys_user''；列不允许有 Null 值。INSERT 失败。', N'2018-09-07 17:31:03.663');
GO
INSERT INTO [dbo].[sys_oper_log] ([oper_id], [title], [business_type], [method], [operator_type], [oper_name], [dept_name], [oper_url], [oper_ip], [oper_location], [oper_param], [status], [error_msg], [oper_time]) VALUES (N'109', N'用户管理', N'1', N'com.ruoyi.project.system.user.controller.UserController.addSave()', N'1', N'admin', N'研发部门', N'/system/user/add', N'127.0.0.1', N'XX XX', N'{"deptId":["104"],"loginName":["aaa"],"userName":["admin"],"password":["admin123"],"email":["aa@qq.com"],"phonenumber":["13978880563"],"sex":["0"],"status":["0"],"roleIds":["1,2"],"postIds":["2"]}', N'1', N'
### Error updating database.  Cause: com.microsoft.sqlserver.jdbc.SQLServerException: 不能将值 NULL 插入列 ''user_id''，表 ''ruoyi.dbo.sys_user''；列不允许有 Null 值。INSERT 失败。
### The error may involve com.ruoyi.project.system.user.mapper.UserMapper.insertUser-Inline
### The error occurred while setting parameters
### SQL: insert into sys_user(            dept_id,       login_name,       user_name,       email,       phonenumber,       sex,       password,       salt,       status,       create_by,            create_time    )values(            ?,       ?,       ?,       ?,       ?,       ?,       ?,       ?,       ?,       ?,          GETDATE()    )
### Cause: com.microsoft.sqlserver.jdbc.SQLServerException: 不能将值 NULL 插入列 ''user_id''，表 ''ruoyi.dbo.sys_user''；列不允许有 Null 值。INSERT 失败。
; ]; 不能将值 NULL 插入列 ''user_id''，表 ''ruoyi.dbo.sys_user''；列不允许有 Null 值。INSERT 失败。; nested exception is com.microsoft.sqlserver.jdbc.SQLServerException: 不能将值 NULL 插入列 ''user_id''，表 ''ruoyi.dbo.sys_user''；列不允许有 Null 值。INSERT 失败。', N'2018-09-07 17:31:34.277');
GO
INSERT INTO [dbo].[sys_oper_log] ([oper_id], [title], [business_type], [method], [operator_type], [oper_name], [dept_name], [oper_url], [oper_ip], [oper_location], [oper_param], [status], [error_msg], [oper_time]) VALUES (N'110', N'用户管理', N'1', N'com.ruoyi.project.system.user.controller.UserController.addSave()', N'1', N'admin', N'研发部门', N'/system/user/add', N'127.0.0.1', N'XX XX', N'{"deptId":["104"],"loginName":["aaa"],"userName":["admin"],"password":["admin123"],"email":["aa@qq.com"],"phonenumber":["13978880563"],"sex":["0"],"status":["0"],"roleIds":["1,2"],"postIds":["2"]}', N'0', null, N'2018-09-07 17:32:49.850');
GO
INSERT INTO [dbo].[sys_oper_log] ([oper_id], [title], [business_type], [method], [operator_type], [oper_name], [dept_name], [oper_url], [oper_ip], [oper_location], [oper_param], [status], [error_msg], [oper_time]) VALUES (N'111', N'用户管理', N'1', N'com.ruoyi.project.system.user.controller.UserController.addSave()', N'1', N'admin', N'研发部门', N'/system/user/add', N'127.0.0.1', N'XX XX', N'{"deptId":["105"],"loginName":["AA"],"userName":["admin"],"password":["admin123"],"email":["6349336@qq.com"],"phonenumber":["15888888122"],"sex":["0"],"status":["0"],"roleIds":["1,2"],"postIds":["2"]}', N'0', null, N'2018-09-10 09:03:15.000');
GO
INSERT INTO [dbo].[sys_oper_log] ([oper_id], [title], [business_type], [method], [operator_type], [oper_name], [dept_name], [oper_url], [oper_ip], [oper_location], [oper_param], [status], [error_msg], [oper_time]) VALUES (N'112', N'用户管理', N'2', N'com.ruoyi.project.system.user.controller.UserController.editSave()', N'1', N'admin', N'研发部门', N'/system/user/edit', N'127.0.0.1', N'XX XX', N'{"userId":["4"],"deptId":["105"],"userName":["admin"],"email":["6349336@qq.com"],"phonenumber":["15888888122"],"sex":["0"],"status":["0"],"roleIds":[""],"postIds":["2"]}', N'0', null, N'2018-09-10 09:03:22.920');
GO
INSERT INTO [dbo].[sys_oper_log] ([oper_id], [title], [business_type], [method], [operator_type], [oper_name], [dept_name], [oper_url], [oper_ip], [oper_location], [oper_param], [status], [error_msg], [oper_time]) VALUES (N'113', N'参数管理', N'2', N'com.ruoyi.project.system.config.controller.ConfigController.editSave()', N'1', N'admin', N'研发部门', N'/system/config/edit', N'127.0.0.1', N'XX XX', N'{"configId":["1"],"configName":["主框架页-默认皮肤样式名称"],"configKey":["sys.index.skinName"],"configValue":[" skin-blue"],"configType":["Y"],"remark":["默认 skin-default、蓝色 skin-blue、黄色 skin-yellow"]}', N'0', null, N'2018-09-10 09:15:27.417');
GO
INSERT INTO [dbo].[sys_oper_log] ([oper_id], [title], [business_type], [method], [operator_type], [oper_name], [dept_name], [oper_url], [oper_ip], [oper_location], [oper_param], [status], [error_msg], [oper_time]) VALUES (N'114', N'参数管理', N'2', N'com.ruoyi.project.system.config.controller.ConfigController.editSave()', N'1', N'admin', N'研发部门', N'/system/config/edit', N'127.0.0.1', N'XX XX', N'{"configId":["1"],"configName":["主框架页-默认皮肤样式名称"],"configKey":["sys.index.skinName"],"configValue":["skin-default"],"configType":["Y"],"remark":["默认 skin-default、蓝色 skin-blue、黄色 skin-yellow"]}', N'0', null, N'2018-09-10 09:41:30.597');
GO
INSERT INTO [dbo].[sys_oper_log] ([oper_id], [title], [business_type], [method], [operator_type], [oper_name], [dept_name], [oper_url], [oper_ip], [oper_location], [oper_param], [status], [error_msg], [oper_time]) VALUES (N'115', N'代码生成', N'8', N'com.ruoyi.project.tool.gen.controller.GenController.genCode()', N'1', N'admin', N'研发部门', N'/tool/gen/genCode/zl_xzdept', N'127.0.0.1', N'XX XX', N'{}', N'0', null, N'2018-09-10 09:52:53.990');
GO
INSERT INTO [dbo].[sys_oper_log] ([oper_id], [title], [business_type], [method], [operator_type], [oper_name], [dept_name], [oper_url], [oper_ip], [oper_location], [oper_param], [status], [error_msg], [oper_time]) VALUES (N'116', N'菜单管理', N'1', N'com.ruoyi.project.system.menu.controller.MenuController.addSave()', N'1', N'admin', N'研发部门', N'/system/menu/add', N'127.0.0.1', N'XX XX', N'{"parentId":["0"],"menuType":["M"],"menuName":["测试项目"],"url":[""],"perms":[""],"orderNum":["4"],"icon":["fa fa-address-book-o"],"visible":["0"]}', N'0', null, N'2018-09-10 09:57:07.357');
GO
INSERT INTO [dbo].[sys_oper_log] ([oper_id], [title], [business_type], [method], [operator_type], [oper_name], [dept_name], [oper_url], [oper_ip], [oper_location], [oper_param], [status], [error_msg], [oper_time]) VALUES (N'118', N'行政单位', N'1', N'com.ruoyi.project.module.xzdept.controller.XzdeptController.addSave()', N'1', N'admin', N'研发部门', N'/module/xzdept/add', N'127.0.0.1', N'XX XX', N'{"parentId":[""],"ancestors":[""],"xzdeptName":["南华糖业"],"orderNum":[""],"leader":[""],"phone":[""],"email":[""],"status":[""],"createBy":[""],"createTime":[""],"updateBy":[""],"updateTime":[""]}', N'0', null, N'2018-09-10 10:12:09.273');
GO
INSERT INTO [dbo].[sys_oper_log] ([oper_id], [title], [business_type], [method], [operator_type], [oper_name], [dept_name], [oper_url], [oper_ip], [oper_location], [oper_param], [status], [error_msg], [oper_time]) VALUES (N'119', N'在线用户', N'7', N'com.ruoyi.project.monitor.online.controller.UserOnlineController.forceLogout()', N'1', N'admin', N'研发部门', N'/monitor/online/forceLogout', N'127.0.0.1', N'XX XX', N'{"sessionId":["c6743734-dd83-4868-90d3-34321544051b"]}', N'0', null, N'2018-09-10 10:39:46.850');
GO
INSERT INTO [dbo].[sys_oper_log] ([oper_id], [title], [business_type], [method], [operator_type], [oper_name], [dept_name], [oper_url], [oper_ip], [oper_location], [oper_param], [status], [error_msg], [oper_time]) VALUES (N'120', N'在线用户', N'7', N'com.ruoyi.project.monitor.online.controller.UserOnlineController.forceLogout()', N'1', N'admin', N'研发部门', N'/monitor/online/forceLogout', N'127.0.0.1', N'XX XX', N'{"sessionId":["6725574b-78ec-414e-990b-123b961717ae"]}', N'0', null, N'2018-09-10 10:41:10.873');
GO
INSERT INTO [dbo].[sys_oper_log] ([oper_id], [title], [business_type], [method], [operator_type], [oper_name], [dept_name], [oper_url], [oper_ip], [oper_location], [oper_param], [status], [error_msg], [oper_time]) VALUES (N'121', N'在线用户', N'7', N'com.ruoyi.project.monitor.online.controller.UserOnlineController.forceLogout()', N'1', N'admin', N'研发部门', N'/monitor/online/forceLogout', N'127.0.0.1', N'XX XX', N'{"sessionId":["c6743734-dd83-4868-90d3-34321544051b"]}', N'1', N'Error getting generated key or setting result to parameter object. Cause: com.microsoft.sqlserver.jdbc.SQLServerException: 必须执行该语句才能获得结果。
; uncategorized SQLException; SQL state [null]; error code [0]; 必须执行该语句才能获得结果。; nested exception is com.microsoft.sqlserver.jdbc.SQLServerException: 必须执行该语句才能获得结果。', N'2018-09-10 10:41:14.300');
GO
INSERT INTO [dbo].[sys_oper_log] ([oper_id], [title], [business_type], [method], [operator_type], [oper_name], [dept_name], [oper_url], [oper_ip], [oper_location], [oper_param], [status], [error_msg], [oper_time]) VALUES (N'122', N'在线用户', N'7', N'com.ruoyi.project.monitor.online.controller.UserOnlineController.forceLogout()', N'1', N'admin', N'研发部门', N'/monitor/online/forceLogout', N'127.0.0.1', N'XX XX', N'{"sessionId":["c6743734-dd83-4868-90d3-34321544051b"]}', N'1', N'Error getting generated key or setting result to parameter object. Cause: com.microsoft.sqlserver.jdbc.SQLServerException: 必须执行该语句才能获得结果。
; uncategorized SQLException; SQL state [null]; error code [0]; 必须执行该语句才能获得结果。; nested exception is com.microsoft.sqlserver.jdbc.SQLServerException: 必须执行该语句才能获得结果。', N'2018-09-10 10:41:36.243');
GO
INSERT INTO [dbo].[sys_oper_log] ([oper_id], [title], [business_type], [method], [operator_type], [oper_name], [dept_name], [oper_url], [oper_ip], [oper_location], [oper_param], [status], [error_msg], [oper_time]) VALUES (N'123', N'代码生成', N'8', N'com.ruoyi.project.tool.gen.controller.GenController.genCode()', N'1', N'admin', N'研发部门', N'/tool/gen/genCode/zl_xzdept', N'127.0.0.1', N'XX XX', N'{}', N'0', null, N'2018-09-10 11:28:31.800');
GO
INSERT INTO [dbo].[sys_oper_log] ([oper_id], [title], [business_type], [method], [operator_type], [oper_name], [dept_name], [oper_url], [oper_ip], [oper_location], [oper_param], [status], [error_msg], [oper_time]) VALUES (N'124', N'菜单管理', N'2', N'com.ruoyi.project.system.menu.controller.MenuController.editSave()', N'1', N'admin', N'研发部门', N'/system/menu/edit', N'127.0.0.1', N'XX XX', N'{"menuId":["1062"],"parentId":["1057"],"menuType":["F"],"menuName":["行政单位导出"],"url":["#"],"perms":["module:xzdept:export"],"orderNum":["5"],"icon":["#"],"visible":["0"]}', N'0', null, N'2018-09-10 11:38:54.540');
GO
INSERT INTO [dbo].[sys_oper_log] ([oper_id], [title], [business_type], [method], [operator_type], [oper_name], [dept_name], [oper_url], [oper_ip], [oper_location], [oper_param], [status], [error_msg], [oper_time]) VALUES (N'125', N'行政单位', N'5', N'com.ruoyi.project.module.xzdept.controller.XzdeptController.export()', N'1', N'admin', N'研发部门', N'/module/xzdept/export', N'127.0.0.1', N'XX XX', N'{"xzdeptId":[""],"parentId":[""],"ancestors":[""],"xzdeptName":[""],"orderNum":[""],"leader":[""],"phone":[""],"email":[""],"status":[""],"createBy":[""],"createTime":[""],"updateBy":[""],"updateTime":[""]}', N'0', null, N'2018-09-10 11:39:04.467');
GO
SET IDENTITY_INSERT [dbo].[sys_oper_log] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[sys_post]
-- ----------------------------
DROP TABLE [dbo].[sys_post]
GO
CREATE TABLE [dbo].[sys_post] (
[post_id] bigint NOT NULL IDENTITY(1,1) ,
[post_code] varchar(64) NOT NULL DEFAULT '' ,
[post_name] varchar(50) NOT NULL DEFAULT '' ,
[post_sort] bigint NOT NULL DEFAULT ((0)) ,
[status] varchar(1) NOT NULL DEFAULT ((0)) ,
[create_by] varchar(64) NULL DEFAULT '' ,
[create_time] datetime NULL DEFAULT (getdate()) ,
[update_by] varchar(64) NULL DEFAULT '' ,
[update_time] datetime NULL DEFAULT (getdate()) ,
[remark] varchar(500) NULL DEFAULT '' 
)


GO
DBCC CHECKIDENT(N'[dbo].[sys_post]', RESEED, 4)
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_post', 
NULL, NULL)) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'岗位信息表'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_post'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'岗位信息表'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_post'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_post', 
'COLUMN', N'post_id')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'岗位ID'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_post'
, @level2type = 'COLUMN', @level2name = N'post_id'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'岗位ID'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_post'
, @level2type = 'COLUMN', @level2name = N'post_id'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_post', 
'COLUMN', N'post_code')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'岗位编码'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_post'
, @level2type = 'COLUMN', @level2name = N'post_code'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'岗位编码'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_post'
, @level2type = 'COLUMN', @level2name = N'post_code'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_post', 
'COLUMN', N'post_name')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'岗位名称'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_post'
, @level2type = 'COLUMN', @level2name = N'post_name'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'岗位名称'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_post'
, @level2type = 'COLUMN', @level2name = N'post_name'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_post', 
'COLUMN', N'post_sort')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'显示顺序'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_post'
, @level2type = 'COLUMN', @level2name = N'post_sort'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'显示顺序'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_post'
, @level2type = 'COLUMN', @level2name = N'post_sort'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_post', 
'COLUMN', N'status')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'状态（0正常 1停用）'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_post'
, @level2type = 'COLUMN', @level2name = N'status'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'状态（0正常 1停用）'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_post'
, @level2type = 'COLUMN', @level2name = N'status'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_post', 
'COLUMN', N'create_by')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'创建者'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_post'
, @level2type = 'COLUMN', @level2name = N'create_by'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'创建者'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_post'
, @level2type = 'COLUMN', @level2name = N'create_by'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_post', 
'COLUMN', N'create_time')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'创建时间'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_post'
, @level2type = 'COLUMN', @level2name = N'create_time'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'创建时间'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_post'
, @level2type = 'COLUMN', @level2name = N'create_time'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_post', 
'COLUMN', N'update_by')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'更新者'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_post'
, @level2type = 'COLUMN', @level2name = N'update_by'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'更新者'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_post'
, @level2type = 'COLUMN', @level2name = N'update_by'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_post', 
'COLUMN', N'update_time')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'更新时间'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_post'
, @level2type = 'COLUMN', @level2name = N'update_time'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'更新时间'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_post'
, @level2type = 'COLUMN', @level2name = N'update_time'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_post', 
'COLUMN', N'remark')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'备注'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_post'
, @level2type = 'COLUMN', @level2name = N'remark'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'备注'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_post'
, @level2type = 'COLUMN', @level2name = N'remark'
GO

-- ----------------------------
-- Records of sys_post
-- ----------------------------
SET IDENTITY_INSERT [dbo].[sys_post] ON
GO
INSERT INTO [dbo].[sys_post] ([post_id], [post_code], [post_name], [post_sort], [status], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'1', N'ceo', N'董事长', N'1', N'0', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'');
GO
INSERT INTO [dbo].[sys_post] ([post_id], [post_code], [post_name], [post_sort], [status], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'2', N'se', N'项目经理', N'2', N'0', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'');
GO
INSERT INTO [dbo].[sys_post] ([post_id], [post_code], [post_name], [post_sort], [status], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'3', N'hr', N'人力资源', N'3', N'0', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'');
GO
INSERT INTO [dbo].[sys_post] ([post_id], [post_code], [post_name], [post_sort], [status], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'4', N'user', N'普通员工', N'4', N'0', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'');
GO
SET IDENTITY_INSERT [dbo].[sys_post] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[sys_role]
-- ----------------------------
DROP TABLE [dbo].[sys_role]
GO
CREATE TABLE [dbo].[sys_role] (
[role_id] bigint NOT NULL IDENTITY(1,1) ,
[role_name] varchar(50) NOT NULL DEFAULT '' ,
[role_key] varchar(100) NOT NULL DEFAULT '' ,
[role_sort] int NOT NULL DEFAULT ((0)) ,
[data_scope] char(1) NULL DEFAULT ((0)) ,
[status] char(1) NOT NULL DEFAULT ((0)) ,
[del_flag] char(1) NULL DEFAULT ((0)) ,
[create_by] varchar(64) NULL DEFAULT '' ,
[create_time] datetime NULL DEFAULT (getdate()) ,
[update_by] varchar(64) NULL DEFAULT '' ,
[update_time] datetime NULL DEFAULT (getdate()) ,
[remark] varchar(500) NULL DEFAULT '' 
)


GO
DBCC CHECKIDENT(N'[dbo].[sys_role]', RESEED, 3)
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_role', 
NULL, NULL)) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'角色信息表'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_role'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'角色信息表'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_role'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_role', 
'COLUMN', N'role_id')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'角色ID'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_role'
, @level2type = 'COLUMN', @level2name = N'role_id'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'角色ID'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_role'
, @level2type = 'COLUMN', @level2name = N'role_id'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_role', 
'COLUMN', N'role_name')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'角色名称'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_role'
, @level2type = 'COLUMN', @level2name = N'role_name'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'角色名称'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_role'
, @level2type = 'COLUMN', @level2name = N'role_name'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_role', 
'COLUMN', N'role_key')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'角色权限字符串'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_role'
, @level2type = 'COLUMN', @level2name = N'role_key'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'角色权限字符串'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_role'
, @level2type = 'COLUMN', @level2name = N'role_key'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_role', 
'COLUMN', N'role_sort')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'显示顺序'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_role'
, @level2type = 'COLUMN', @level2name = N'role_sort'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'显示顺序'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_role'
, @level2type = 'COLUMN', @level2name = N'role_sort'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_role', 
'COLUMN', N'data_scope')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'数据范围（1：全部数据权限 2：自定数据权限）'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_role'
, @level2type = 'COLUMN', @level2name = N'data_scope'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'数据范围（1：全部数据权限 2：自定数据权限）'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_role'
, @level2type = 'COLUMN', @level2name = N'data_scope'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_role', 
'COLUMN', N'status')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'角色状态（0正常 1停用）'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_role'
, @level2type = 'COLUMN', @level2name = N'status'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'角色状态（0正常 1停用）'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_role'
, @level2type = 'COLUMN', @level2name = N'status'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_role', 
'COLUMN', N'del_flag')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'删除标志（0代表存在 2代表删除）'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_role'
, @level2type = 'COLUMN', @level2name = N'del_flag'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'删除标志（0代表存在 2代表删除）'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_role'
, @level2type = 'COLUMN', @level2name = N'del_flag'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_role', 
'COLUMN', N'create_by')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'创建者'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_role'
, @level2type = 'COLUMN', @level2name = N'create_by'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'创建者'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_role'
, @level2type = 'COLUMN', @level2name = N'create_by'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_role', 
'COLUMN', N'create_time')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'创建时间'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_role'
, @level2type = 'COLUMN', @level2name = N'create_time'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'创建时间'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_role'
, @level2type = 'COLUMN', @level2name = N'create_time'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_role', 
'COLUMN', N'update_by')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'更新者'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_role'
, @level2type = 'COLUMN', @level2name = N'update_by'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'更新者'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_role'
, @level2type = 'COLUMN', @level2name = N'update_by'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_role', 
'COLUMN', N'update_time')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'更新时间'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_role'
, @level2type = 'COLUMN', @level2name = N'update_time'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'更新时间'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_role'
, @level2type = 'COLUMN', @level2name = N'update_time'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_role', 
'COLUMN', N'remark')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'备注'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_role'
, @level2type = 'COLUMN', @level2name = N'remark'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'备注'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_role'
, @level2type = 'COLUMN', @level2name = N'remark'
GO

-- ----------------------------
-- Records of sys_role
-- ----------------------------
SET IDENTITY_INSERT [dbo].[sys_role] ON
GO
INSERT INTO [dbo].[sys_role] ([role_id], [role_name], [role_key], [role_sort], [data_scope], [status], [del_flag], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'1', N'管理员', N'admin', N'1', N'1', N'0', N'0', N'admin', N'2018-03-16 11:33:00.000', N'admin', N'2018-09-10 10:11:08.147', N'管理员');
GO
INSERT INTO [dbo].[sys_role] ([role_id], [role_name], [role_key], [role_sort], [data_scope], [status], [del_flag], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'2', N'普通角色', N'common', N'2', N'2', N'0', N'0', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'普通角色');
GO
INSERT INTO [dbo].[sys_role] ([role_id], [role_name], [role_key], [role_sort], [data_scope], [status], [del_flag], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'3', N'SSFD', N'cctv', N'3', N'2', N'0', N'2', N'admin', N'2018-09-06 16:46:20.000', N'admin', N'2018-09-06 16:46:36.000', N'');
GO
SET IDENTITY_INSERT [dbo].[sys_role] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[sys_role_dept]
-- ----------------------------
DROP TABLE [dbo].[sys_role_dept]
GO
CREATE TABLE [dbo].[sys_role_dept] (
[role_id] bigint NOT NULL ,
[dept_id] bigint NOT NULL 
)


GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_role_dept', 
NULL, NULL)) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'角色和部门关联表'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_role_dept'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'角色和部门关联表'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_role_dept'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_role_dept', 
'COLUMN', N'role_id')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'角色ID'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_role_dept'
, @level2type = 'COLUMN', @level2name = N'role_id'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'角色ID'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_role_dept'
, @level2type = 'COLUMN', @level2name = N'role_id'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_role_dept', 
'COLUMN', N'dept_id')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'部门ID'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_role_dept'
, @level2type = 'COLUMN', @level2name = N'dept_id'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'部门ID'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_role_dept'
, @level2type = 'COLUMN', @level2name = N'dept_id'
GO

-- ----------------------------
-- Records of sys_role_dept
-- ----------------------------
INSERT INTO [dbo].[sys_role_dept] ([role_id], [dept_id]) VALUES (N'3', N'100');
GO
INSERT INTO [dbo].[sys_role_dept] ([role_id], [dept_id]) VALUES (N'3', N'101');
GO
INSERT INTO [dbo].[sys_role_dept] ([role_id], [dept_id]) VALUES (N'3', N'102');
GO
INSERT INTO [dbo].[sys_role_dept] ([role_id], [dept_id]) VALUES (N'3', N'106');
GO
INSERT INTO [dbo].[sys_role_dept] ([role_id], [dept_id]) VALUES (N'3', N'107');
GO
INSERT INTO [dbo].[sys_role_dept] ([role_id], [dept_id]) VALUES (N'3', N'109');
GO

-- ----------------------------
-- Table structure for [dbo].[sys_role_menu]
-- ----------------------------
DROP TABLE [dbo].[sys_role_menu]
GO
CREATE TABLE [dbo].[sys_role_menu] (
[role_id] bigint NOT NULL ,
[menu_id] bigint NOT NULL 
)


GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_role_menu', 
NULL, NULL)) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'角色和菜单关联表'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_role_menu'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'角色和菜单关联表'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_role_menu'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_role_menu', 
'COLUMN', N'role_id')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'角色ID'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_role_menu'
, @level2type = 'COLUMN', @level2name = N'role_id'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'角色ID'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_role_menu'
, @level2type = 'COLUMN', @level2name = N'role_id'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_role_menu', 
'COLUMN', N'menu_id')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'菜单ID'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_role_menu'
, @level2type = 'COLUMN', @level2name = N'menu_id'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'菜单ID'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_role_menu'
, @level2type = 'COLUMN', @level2name = N'menu_id'
GO

-- ----------------------------
-- Records of sys_role_menu
-- ----------------------------
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'1', N'1');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'1', N'2');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'1', N'3');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'1', N'100');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'1', N'101');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'1', N'102');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'1', N'103');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'1', N'104');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'1', N'105');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'1', N'106');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'1', N'107');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'1', N'108');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'1', N'109');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'1', N'110');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'1', N'111');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'1', N'112');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'1', N'113');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'1', N'114');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'1', N'500');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'1', N'501');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'1', N'1000');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'1', N'1001');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'1', N'1002');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'1', N'1003');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'1', N'1004');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'1', N'1005');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'1', N'1006');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'1', N'1007');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'1', N'1008');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'1', N'1009');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'1', N'1010');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'1', N'1011');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'1', N'1012');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'1', N'1013');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'1', N'1014');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'1', N'1015');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'1', N'1016');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'1', N'1017');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'1', N'1018');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'1', N'1019');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'1', N'1020');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'1', N'1021');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'1', N'1022');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'1', N'1023');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'1', N'1024');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'1', N'1025');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'1', N'1026');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'1', N'1027');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'1', N'1028');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'1', N'1029');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'1', N'1030');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'1', N'1031');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'1', N'1032');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'1', N'1033');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'1', N'1034');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'1', N'1035');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'1', N'1036');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'1', N'1037');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'1', N'1038');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'1', N'1039');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'1', N'1040');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'1', N'1041');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'1', N'1042');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'1', N'1043');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'1', N'1044');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'1', N'1045');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'1', N'1046');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'1', N'1047');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'1', N'1048');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'1', N'1049');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'1', N'1050');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'1', N'1051');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'1', N'1052');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'1', N'1053');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'1', N'1054');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'1', N'1055');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'1', N'1056');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'1', N'1057');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'1', N'1058');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'1', N'1059');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'1', N'1060');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'1', N'1061');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'1', N'1062');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'3', N'1');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'3', N'2');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'3', N'3');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'3', N'100');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'3', N'101');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'3', N'102');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'3', N'103');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'3', N'104');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'3', N'105');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'3', N'106');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'3', N'107');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'3', N'108');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'3', N'109');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'3', N'110');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'3', N'111');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'3', N'112');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'3', N'113');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'3', N'114');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'3', N'500');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'3', N'501');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'3', N'1000');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'3', N'1001');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'3', N'1002');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'3', N'1003');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'3', N'1004');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'3', N'1005');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'3', N'1006');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'3', N'1007');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'3', N'1008');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'3', N'1009');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'3', N'1010');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'3', N'1011');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'3', N'1012');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'3', N'1013');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'3', N'1014');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'3', N'1015');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'3', N'1016');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'3', N'1017');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'3', N'1018');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'3', N'1019');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'3', N'1020');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'3', N'1021');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'3', N'1022');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'3', N'1023');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'3', N'1024');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'3', N'1025');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'3', N'1026');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'3', N'1027');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'3', N'1028');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'3', N'1029');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'3', N'1030');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'3', N'1031');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'3', N'1032');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'3', N'1033');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'3', N'1034');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'3', N'1035');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'3', N'1036');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'3', N'1037');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'3', N'1038');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'3', N'1039');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'3', N'1040');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'3', N'1041');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'3', N'1042');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'3', N'1043');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'3', N'1044');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'3', N'1045');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'3', N'1046');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'3', N'1047');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'3', N'1048');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'3', N'1049');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'3', N'1050');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'3', N'1051');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'3', N'1052');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'3', N'1053');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'3', N'1054');
GO
INSERT INTO [dbo].[sys_role_menu] ([role_id], [menu_id]) VALUES (N'3', N'1055');
GO

-- ----------------------------
-- Table structure for [dbo].[sys_user]
-- ----------------------------
DROP TABLE [dbo].[sys_user]
GO
CREATE TABLE [dbo].[sys_user] (
[user_id] bigint NOT NULL IDENTITY(1,1) ,
[dept_id] bigint NULL ,
[login_name] varchar(50) NOT NULL DEFAULT '' ,
[user_name] varchar(50) NOT NULL DEFAULT '' ,
[user_type] varchar(50) NULL DEFAULT '' ,
[email] varchar(50) NULL DEFAULT '' ,
[phonenumber] varchar(50) NULL DEFAULT '' ,
[sex] varchar(1) NULL DEFAULT '' ,
[avatar] varchar(100) NULL DEFAULT '' ,
[password] varchar(50) NULL DEFAULT '' ,
[salt] varchar(50) NULL DEFAULT '' ,
[status] varchar(1) NULL DEFAULT ((0)) ,
[del_flag] varchar(1) NULL DEFAULT ((0)) ,
[login_ip] varchar(50) NULL DEFAULT '' ,
[login_date] datetime NULL DEFAULT (getdate()) ,
[create_by] varchar(64) NULL DEFAULT '' ,
[create_time] datetime NULL DEFAULT (getdate()) ,
[update_by] varchar(64) NULL DEFAULT '' ,
[update_time] datetime NULL DEFAULT (getdate()) ,
[remark] varchar(500) NULL DEFAULT '' 
)


GO
DBCC CHECKIDENT(N'[dbo].[sys_user]', RESEED, 4)
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_user', 
NULL, NULL)) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'用户信息表'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_user'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'用户信息表'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_user'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_user', 
'COLUMN', N'user_id')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'用户ID'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_user'
, @level2type = 'COLUMN', @level2name = N'user_id'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'用户ID'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_user'
, @level2type = 'COLUMN', @level2name = N'user_id'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_user', 
'COLUMN', N'dept_id')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'部门ID'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_user'
, @level2type = 'COLUMN', @level2name = N'dept_id'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'部门ID'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_user'
, @level2type = 'COLUMN', @level2name = N'dept_id'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_user', 
'COLUMN', N'login_name')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'登录账号'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_user'
, @level2type = 'COLUMN', @level2name = N'login_name'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'登录账号'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_user'
, @level2type = 'COLUMN', @level2name = N'login_name'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_user', 
'COLUMN', N'user_name')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'用户昵称'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_user'
, @level2type = 'COLUMN', @level2name = N'user_name'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'用户昵称'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_user'
, @level2type = 'COLUMN', @level2name = N'user_name'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_user', 
'COLUMN', N'user_type')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'用户类型（00系统用户）'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_user'
, @level2type = 'COLUMN', @level2name = N'user_type'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'用户类型（00系统用户）'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_user'
, @level2type = 'COLUMN', @level2name = N'user_type'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_user', 
'COLUMN', N'email')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'用户邮箱'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_user'
, @level2type = 'COLUMN', @level2name = N'email'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'用户邮箱'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_user'
, @level2type = 'COLUMN', @level2name = N'email'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_user', 
'COLUMN', N'phonenumber')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'手机号码'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_user'
, @level2type = 'COLUMN', @level2name = N'phonenumber'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'手机号码'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_user'
, @level2type = 'COLUMN', @level2name = N'phonenumber'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_user', 
'COLUMN', N'sex')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'用户性别（0男 1女 2未知）'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_user'
, @level2type = 'COLUMN', @level2name = N'sex'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'用户性别（0男 1女 2未知）'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_user'
, @level2type = 'COLUMN', @level2name = N'sex'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_user', 
'COLUMN', N'avatar')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'头像路径'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_user'
, @level2type = 'COLUMN', @level2name = N'avatar'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'头像路径'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_user'
, @level2type = 'COLUMN', @level2name = N'avatar'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_user', 
'COLUMN', N'password')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'密码'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_user'
, @level2type = 'COLUMN', @level2name = N'password'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'密码'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_user'
, @level2type = 'COLUMN', @level2name = N'password'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_user', 
'COLUMN', N'salt')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'盐加密'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_user'
, @level2type = 'COLUMN', @level2name = N'salt'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'盐加密'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_user'
, @level2type = 'COLUMN', @level2name = N'salt'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_user', 
'COLUMN', N'status')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'帐号状态（0正常 1停用）'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_user'
, @level2type = 'COLUMN', @level2name = N'status'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'帐号状态（0正常 1停用）'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_user'
, @level2type = 'COLUMN', @level2name = N'status'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_user', 
'COLUMN', N'del_flag')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'删除标志（0代表存在 2代表删除）'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_user'
, @level2type = 'COLUMN', @level2name = N'del_flag'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'删除标志（0代表存在 2代表删除）'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_user'
, @level2type = 'COLUMN', @level2name = N'del_flag'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_user', 
'COLUMN', N'login_ip')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'最后登陆IP'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_user'
, @level2type = 'COLUMN', @level2name = N'login_ip'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'最后登陆IP'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_user'
, @level2type = 'COLUMN', @level2name = N'login_ip'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_user', 
'COLUMN', N'login_date')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'最后登陆时间'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_user'
, @level2type = 'COLUMN', @level2name = N'login_date'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'最后登陆时间'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_user'
, @level2type = 'COLUMN', @level2name = N'login_date'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_user', 
'COLUMN', N'create_by')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'创建者'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_user'
, @level2type = 'COLUMN', @level2name = N'create_by'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'创建者'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_user'
, @level2type = 'COLUMN', @level2name = N'create_by'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_user', 
'COLUMN', N'create_time')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'创建时间'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_user'
, @level2type = 'COLUMN', @level2name = N'create_time'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'创建时间'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_user'
, @level2type = 'COLUMN', @level2name = N'create_time'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_user', 
'COLUMN', N'update_by')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'更新者'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_user'
, @level2type = 'COLUMN', @level2name = N'update_by'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'更新者'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_user'
, @level2type = 'COLUMN', @level2name = N'update_by'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_user', 
'COLUMN', N'update_time')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'更新时间'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_user'
, @level2type = 'COLUMN', @level2name = N'update_time'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'更新时间'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_user'
, @level2type = 'COLUMN', @level2name = N'update_time'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_user', 
'COLUMN', N'remark')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'备注'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_user'
, @level2type = 'COLUMN', @level2name = N'remark'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'备注'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_user'
, @level2type = 'COLUMN', @level2name = N'remark'
GO

-- ----------------------------
-- Records of sys_user
-- ----------------------------
SET IDENTITY_INSERT [dbo].[sys_user] ON
GO
INSERT INTO [dbo].[sys_user] ([user_id], [dept_id], [login_name], [user_name], [user_type], [email], [phonenumber], [sex], [avatar], [password], [salt], [status], [del_flag], [login_ip], [login_date], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'1', N'103', N'admin', N'若依', N'00', N'ry@163.com', N'15888888888', N'1', N'', N'29c67a30398638269fe600f73a054934', N'111111', N'0', N'0', N'127.0.0.1', N'2018-09-10 11:35:04.400', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-09-10 11:35:04.397', N'管理员');
GO
INSERT INTO [dbo].[sys_user] ([user_id], [dept_id], [login_name], [user_name], [user_type], [email], [phonenumber], [sex], [avatar], [password], [salt], [status], [del_flag], [login_ip], [login_date], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'2', N'104', N'ry', N'若依', N'00', N'ry@qq.com', N'15666666666', N'1', N'', N'8e6d98b90472783cc73c17047ddccf36', N'222222', N'0', N'0', N'127.0.0.1', N'2018-03-16 11:33:00.000', N'admin', N'2018-03-16 11:33:00.000', N'ry', N'2018-03-16 11:33:00.000', N'测试员');
GO
INSERT INTO [dbo].[sys_user] ([user_id], [dept_id], [login_name], [user_name], [user_type], [email], [phonenumber], [sex], [avatar], [password], [salt], [status], [del_flag], [login_ip], [login_date], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'3', N'104', N'aaa', N'admin', null, N'aa@qq.com', N'13978880563', N'0', null, N'b6a7e465412ef022882e2558a7358c51', N'a61a6b', N'0', null, null, null, N'admin', N'2018-09-07 17:32:49.833', null, null, null);
GO
INSERT INTO [dbo].[sys_user] ([user_id], [dept_id], [login_name], [user_name], [user_type], [email], [phonenumber], [sex], [avatar], [password], [salt], [status], [del_flag], [login_ip], [login_date], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'4', N'105', N'AA', N'admin', N'', N'6349336@qq.com', N'15888888122', N'0', N'', N'dafad065236a651d01b919c5608c1d26', N'd3bfa4', N'0', N'0', N'', N'2018-09-10 09:03:14.923', N'admin', N'2018-09-10 09:03:14.923', N'admin', N'2018-09-10 09:03:22.907', N'');
GO
SET IDENTITY_INSERT [dbo].[sys_user] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[sys_user_online]
-- ----------------------------
DROP TABLE [dbo].[sys_user_online]
GO
CREATE TABLE [dbo].[sys_user_online] (
[sessionId] varchar(50) NOT NULL DEFAULT (newid()) ,
[login_name] varchar(50) NULL DEFAULT '' ,
[dept_name] varchar(50) NULL DEFAULT '' ,
[ipaddr] varchar(50) NULL DEFAULT '' ,
[login_location] varchar(255) NULL DEFAULT '' ,
[browser] varchar(50) NULL DEFAULT '' ,
[os] varchar(50) NULL DEFAULT '' ,
[status] varchar(10) NULL DEFAULT '' ,
[start_timestamp] datetime NULL DEFAULT (getdate()) ,
[last_access_time] datetime NULL DEFAULT (getdate()) ,
[expire_time] bigint NULL DEFAULT ((0)) 
)


GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_user_online', 
NULL, NULL)) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'在线用户记录'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_user_online'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'在线用户记录'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_user_online'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_user_online', 
'COLUMN', N'sessionId')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'用户会话id'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_user_online'
, @level2type = 'COLUMN', @level2name = N'sessionId'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'用户会话id'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_user_online'
, @level2type = 'COLUMN', @level2name = N'sessionId'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_user_online', 
'COLUMN', N'login_name')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'登录账号'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_user_online'
, @level2type = 'COLUMN', @level2name = N'login_name'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'登录账号'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_user_online'
, @level2type = 'COLUMN', @level2name = N'login_name'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_user_online', 
'COLUMN', N'dept_name')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'部门名称'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_user_online'
, @level2type = 'COLUMN', @level2name = N'dept_name'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'部门名称'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_user_online'
, @level2type = 'COLUMN', @level2name = N'dept_name'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_user_online', 
'COLUMN', N'ipaddr')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'登录IP地址'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_user_online'
, @level2type = 'COLUMN', @level2name = N'ipaddr'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'登录IP地址'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_user_online'
, @level2type = 'COLUMN', @level2name = N'ipaddr'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_user_online', 
'COLUMN', N'login_location')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'登录地点'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_user_online'
, @level2type = 'COLUMN', @level2name = N'login_location'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'登录地点'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_user_online'
, @level2type = 'COLUMN', @level2name = N'login_location'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_user_online', 
'COLUMN', N'browser')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'浏览器类型'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_user_online'
, @level2type = 'COLUMN', @level2name = N'browser'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'浏览器类型'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_user_online'
, @level2type = 'COLUMN', @level2name = N'browser'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_user_online', 
'COLUMN', N'os')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'操作系统'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_user_online'
, @level2type = 'COLUMN', @level2name = N'os'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'操作系统'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_user_online'
, @level2type = 'COLUMN', @level2name = N'os'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_user_online', 
'COLUMN', N'status')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'在线状态on_line在线off_line离线'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_user_online'
, @level2type = 'COLUMN', @level2name = N'status'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'在线状态on_line在线off_line离线'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_user_online'
, @level2type = 'COLUMN', @level2name = N'status'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_user_online', 
'COLUMN', N'start_timestamp')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'session创建时间'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_user_online'
, @level2type = 'COLUMN', @level2name = N'start_timestamp'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'session创建时间'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_user_online'
, @level2type = 'COLUMN', @level2name = N'start_timestamp'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_user_online', 
'COLUMN', N'last_access_time')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'session最后访问时间'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_user_online'
, @level2type = 'COLUMN', @level2name = N'last_access_time'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'session最后访问时间'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_user_online'
, @level2type = 'COLUMN', @level2name = N'last_access_time'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_user_online', 
'COLUMN', N'expire_time')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'超时时间，单位为分钟'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_user_online'
, @level2type = 'COLUMN', @level2name = N'expire_time'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'超时时间，单位为分钟'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_user_online'
, @level2type = 'COLUMN', @level2name = N'expire_time'
GO

-- ----------------------------
-- Records of sys_user_online
-- ----------------------------
INSERT INTO [dbo].[sys_user_online] ([sessionId], [login_name], [dept_name], [ipaddr], [login_location], [browser], [os], [status], [start_timestamp], [last_access_time], [expire_time]) VALUES (N'c945d5f7-b19d-4a24-b72b-86e94c291f9e', N'admin', N'研发部门', N'127.0.0.1', N'XX XX', N'Chrome', N'Windows 7', N'on_line', N'2018-09-10 11:35:02.667', N'2018-09-10 11:38:43.753', N'1800000');
GO

-- ----------------------------
-- Table structure for [dbo].[sys_user_post]
-- ----------------------------
DROP TABLE [dbo].[sys_user_post]
GO
CREATE TABLE [dbo].[sys_user_post] (
[user_id] varchar(64) NOT NULL DEFAULT ((0)) ,
[post_id] varchar(64) NOT NULL DEFAULT ((0)) 
)


GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_user_post', 
NULL, NULL)) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'用户与岗位关联表'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_user_post'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'用户与岗位关联表'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_user_post'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_user_post', 
'COLUMN', N'user_id')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'用户ID'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_user_post'
, @level2type = 'COLUMN', @level2name = N'user_id'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'用户ID'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_user_post'
, @level2type = 'COLUMN', @level2name = N'user_id'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_user_post', 
'COLUMN', N'post_id')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'岗位ID'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_user_post'
, @level2type = 'COLUMN', @level2name = N'post_id'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'岗位ID'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_user_post'
, @level2type = 'COLUMN', @level2name = N'post_id'
GO

-- ----------------------------
-- Records of sys_user_post
-- ----------------------------
INSERT INTO [dbo].[sys_user_post] ([user_id], [post_id]) VALUES (N'1', N'1');
GO
INSERT INTO [dbo].[sys_user_post] ([user_id], [post_id]) VALUES (N'2', N'2');
GO
INSERT INTO [dbo].[sys_user_post] ([user_id], [post_id]) VALUES (N'3', N'2');
GO
INSERT INTO [dbo].[sys_user_post] ([user_id], [post_id]) VALUES (N'4', N'2');
GO

-- ----------------------------
-- Table structure for [dbo].[sys_user_role]
-- ----------------------------
DROP TABLE [dbo].[sys_user_role]
GO
CREATE TABLE [dbo].[sys_user_role] (
[user_id] bigint NOT NULL DEFAULT ((0)) ,
[role_id] bigint NOT NULL DEFAULT ((0)) 
)


GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_user_role', 
NULL, NULL)) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'用户和角色关联表'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_user_role'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'用户和角色关联表'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_user_role'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_user_role', 
'COLUMN', N'user_id')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'用户ID'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_user_role'
, @level2type = 'COLUMN', @level2name = N'user_id'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'用户ID'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_user_role'
, @level2type = 'COLUMN', @level2name = N'user_id'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'sys_user_role', 
'COLUMN', N'role_id')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'角色ID'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_user_role'
, @level2type = 'COLUMN', @level2name = N'role_id'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'角色ID'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'sys_user_role'
, @level2type = 'COLUMN', @level2name = N'role_id'
GO

-- ----------------------------
-- Records of sys_user_role
-- ----------------------------
INSERT INTO [dbo].[sys_user_role] ([user_id], [role_id]) VALUES (N'1', N'1');
GO
INSERT INTO [dbo].[sys_user_role] ([user_id], [role_id]) VALUES (N'2', N'2');
GO
INSERT INTO [dbo].[sys_user_role] ([user_id], [role_id]) VALUES (N'3', N'1');
GO
INSERT INTO [dbo].[sys_user_role] ([user_id], [role_id]) VALUES (N'3', N'2');
GO

-- ----------------------------
-- Table structure for [dbo].[zl_xzdept]
-- ----------------------------
DROP TABLE [dbo].[zl_xzdept]
GO
CREATE TABLE [dbo].[zl_xzdept] (
[xzdept_id] bigint NOT NULL IDENTITY(1,1) ,
[parent_id] bigint NOT NULL DEFAULT ((0)) ,
[ancestors] varchar(50) NOT NULL DEFAULT '' ,
[xzdept_name] varchar(30) NOT NULL DEFAULT '' ,
[order_num] int NOT NULL DEFAULT ((0)) ,
[leader] varchar(20) NOT NULL DEFAULT '' ,
[phone] varchar(11) NOT NULL DEFAULT '' ,
[email] varchar(50) NOT NULL DEFAULT '' ,
[status] varchar(1) NOT NULL DEFAULT ((0)) ,
[create_by] varchar(64) NOT NULL DEFAULT '' ,
[create_time] datetime NOT NULL DEFAULT (getdate()) ,
[update_by] varchar(64) NOT NULL DEFAULT '' ,
[update_time] datetime NOT NULL DEFAULT (getdate()) 
)


GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'zl_xzdept', 
NULL, NULL)) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'行政单位表'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'zl_xzdept'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'行政单位表'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'zl_xzdept'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'zl_xzdept', 
'COLUMN', N'xzdept_id')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'单位ID'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'zl_xzdept'
, @level2type = 'COLUMN', @level2name = N'xzdept_id'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'单位ID'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'zl_xzdept'
, @level2type = 'COLUMN', @level2name = N'xzdept_id'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'zl_xzdept', 
'COLUMN', N'parent_id')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'上级单位ID'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'zl_xzdept'
, @level2type = 'COLUMN', @level2name = N'parent_id'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'上级单位ID'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'zl_xzdept'
, @level2type = 'COLUMN', @level2name = N'parent_id'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'zl_xzdept', 
'COLUMN', N'ancestors')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'祖级列表'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'zl_xzdept'
, @level2type = 'COLUMN', @level2name = N'ancestors'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'祖级列表'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'zl_xzdept'
, @level2type = 'COLUMN', @level2name = N'ancestors'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'zl_xzdept', 
'COLUMN', N'xzdept_name')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'单位名称'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'zl_xzdept'
, @level2type = 'COLUMN', @level2name = N'xzdept_name'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'单位名称'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'zl_xzdept'
, @level2type = 'COLUMN', @level2name = N'xzdept_name'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'zl_xzdept', 
'COLUMN', N'order_num')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'显示顺序'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'zl_xzdept'
, @level2type = 'COLUMN', @level2name = N'order_num'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'显示顺序'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'zl_xzdept'
, @level2type = 'COLUMN', @level2name = N'order_num'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'zl_xzdept', 
'COLUMN', N'leader')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'负责人'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'zl_xzdept'
, @level2type = 'COLUMN', @level2name = N'leader'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'负责人'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'zl_xzdept'
, @level2type = 'COLUMN', @level2name = N'leader'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'zl_xzdept', 
'COLUMN', N'phone')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'联系电话'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'zl_xzdept'
, @level2type = 'COLUMN', @level2name = N'phone'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'联系电话'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'zl_xzdept'
, @level2type = 'COLUMN', @level2name = N'phone'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'zl_xzdept', 
'COLUMN', N'email')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'邮箱'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'zl_xzdept'
, @level2type = 'COLUMN', @level2name = N'email'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'邮箱'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'zl_xzdept'
, @level2type = 'COLUMN', @level2name = N'email'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'zl_xzdept', 
'COLUMN', N'status')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'部门状态（0正常 1停用）'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'zl_xzdept'
, @level2type = 'COLUMN', @level2name = N'status'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'部门状态（0正常 1停用）'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'zl_xzdept'
, @level2type = 'COLUMN', @level2name = N'status'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'zl_xzdept', 
'COLUMN', N'create_by')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'创建者'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'zl_xzdept'
, @level2type = 'COLUMN', @level2name = N'create_by'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'创建者'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'zl_xzdept'
, @level2type = 'COLUMN', @level2name = N'create_by'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'zl_xzdept', 
'COLUMN', N'create_time')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'创建时间'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'zl_xzdept'
, @level2type = 'COLUMN', @level2name = N'create_time'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'创建时间'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'zl_xzdept'
, @level2type = 'COLUMN', @level2name = N'create_time'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'zl_xzdept', 
'COLUMN', N'update_by')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'更新者'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'zl_xzdept'
, @level2type = 'COLUMN', @level2name = N'update_by'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'更新者'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'zl_xzdept'
, @level2type = 'COLUMN', @level2name = N'update_by'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'zl_xzdept', 
'COLUMN', N'update_time')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'更新时间'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'zl_xzdept'
, @level2type = 'COLUMN', @level2name = N'update_time'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'更新时间'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'zl_xzdept'
, @level2type = 'COLUMN', @level2name = N'update_time'
GO

-- ----------------------------
-- Records of zl_xzdept
-- ----------------------------
SET IDENTITY_INSERT [dbo].[zl_xzdept] ON
GO
INSERT INTO [dbo].[zl_xzdept] ([xzdept_id], [parent_id], [ancestors], [xzdept_name], [order_num], [leader], [phone], [email], [status], [create_by], [create_time], [update_by], [update_time]) VALUES (N'1', N'0', N'', N'南华糖业', N'0', N'', N'', N'', N'0', N'', N'2018-09-10 10:12:09.240', N'', N'2018-09-10 10:12:09.240');
GO
SET IDENTITY_INSERT [dbo].[zl_xzdept] OFF
GO

-- ----------------------------
-- Procedure structure for [dbo].[app_saveOnline]
-- ----------------------------
DROP PROCEDURE [dbo].[app_saveOnline]
GO

CREATE PROCEDURE [dbo].[app_saveOnline]
(
    @sessionId [varchar](50),
	@login_name [varchar](50),
	@dept_name [varchar](50) ,
	@ipaddr [varchar](50) ,
	@login_location [varchar](255) ,
	@browser [varchar](50) ,
	@os [varchar](50) ,
	@status [varchar](10) ,
	@start_timestamp [datetime] ,
	@last_access_time [datetime] ,
	@expire_time [bigint] 
	)
AS
BEGIN	
	SET NOCOUNT ON;
if not exists(select sessionId from sys_user_online where sessionId=@sessionId)
	Begin
				insert into sys_user_online(sessionId, login_name, dept_name, ipaddr,login_location,
					browser, os, status, start_timestamp, last_access_time, expire_time)
				values (@sessionId, @login_name, @dept_name, @ipaddr, @login_location,
					@browser, @os, @status, @start_timestamp, @last_access_time, @expire_time)
			end
		else
			begin
				update sys_user_online set login_name=@login_name, dept_name=@dept_name,
					ipaddr=@ipaddr,login_location=@login_location,browser=@browser, os=@os,
					status=@status, start_timestamp=@start_timestamp, last_access_time=@last_access_time,
					expire_time=@expire_time where sessionId=@sessionId
			end
    
END

GO

-- ----------------------------
-- Indexes structure for table qrtz_blob_triggers
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[qrtz_blob_triggers]
-- ----------------------------
ALTER TABLE [dbo].[qrtz_blob_triggers] ADD PRIMARY KEY ([sched_name], [trigger_name], [trigger_group])
GO

-- ----------------------------
-- Indexes structure for table qrtz_calendars
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[qrtz_calendars]
-- ----------------------------
ALTER TABLE [dbo].[qrtz_calendars] ADD PRIMARY KEY ([sched_name], [calendar_name])
GO

-- ----------------------------
-- Indexes structure for table qrtz_cron_triggers
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[qrtz_cron_triggers]
-- ----------------------------
ALTER TABLE [dbo].[qrtz_cron_triggers] ADD PRIMARY KEY ([sched_name], [trigger_name], [trigger_group])
GO

-- ----------------------------
-- Indexes structure for table qrtz_fired_triggers
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[qrtz_fired_triggers]
-- ----------------------------
ALTER TABLE [dbo].[qrtz_fired_triggers] ADD PRIMARY KEY ([sched_name], [entry_id])
GO

-- ----------------------------
-- Indexes structure for table qrtz_job_details
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[qrtz_job_details]
-- ----------------------------
ALTER TABLE [dbo].[qrtz_job_details] ADD PRIMARY KEY ([sched_name], [job_name], [job_group])
GO

-- ----------------------------
-- Indexes structure for table qrtz_locks
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[qrtz_locks]
-- ----------------------------
ALTER TABLE [dbo].[qrtz_locks] ADD PRIMARY KEY ([sched_name], [lock_name])
GO

-- ----------------------------
-- Indexes structure for table qrtz_paused_trigger_grps
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[qrtz_paused_trigger_grps]
-- ----------------------------
ALTER TABLE [dbo].[qrtz_paused_trigger_grps] ADD PRIMARY KEY ([sched_name], [trigger_group])
GO

-- ----------------------------
-- Indexes structure for table qrtz_scheduler_state
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[qrtz_scheduler_state]
-- ----------------------------
ALTER TABLE [dbo].[qrtz_scheduler_state] ADD PRIMARY KEY ([sched_name], [instance_name])
GO

-- ----------------------------
-- Indexes structure for table qrtz_simple_triggers
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[qrtz_simple_triggers]
-- ----------------------------
ALTER TABLE [dbo].[qrtz_simple_triggers] ADD PRIMARY KEY ([sched_name], [trigger_name], [trigger_group])
GO

-- ----------------------------
-- Indexes structure for table qrtz_simprop_triggers
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[qrtz_simprop_triggers]
-- ----------------------------
ALTER TABLE [dbo].[qrtz_simprop_triggers] ADD PRIMARY KEY ([sched_name], [trigger_name], [trigger_group])
GO

-- ----------------------------
-- Indexes structure for table qrtz_triggers
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[qrtz_triggers]
-- ----------------------------
ALTER TABLE [dbo].[qrtz_triggers] ADD PRIMARY KEY ([sched_name], [trigger_name], [trigger_group])
GO

-- ----------------------------
-- Indexes structure for table sys_config
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[sys_config]
-- ----------------------------
ALTER TABLE [dbo].[sys_config] ADD PRIMARY KEY ([config_id])
GO

-- ----------------------------
-- Indexes structure for table sys_dept
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[sys_dept]
-- ----------------------------
ALTER TABLE [dbo].[sys_dept] ADD PRIMARY KEY ([dept_id])
GO

-- ----------------------------
-- Indexes structure for table sys_dict_data
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[sys_dict_data]
-- ----------------------------
ALTER TABLE [dbo].[sys_dict_data] ADD PRIMARY KEY ([dict_code])
GO

-- ----------------------------
-- Indexes structure for table sys_dict_type
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[sys_dict_type]
-- ----------------------------
ALTER TABLE [dbo].[sys_dict_type] ADD PRIMARY KEY ([dict_id])
GO

-- ----------------------------
-- Indexes structure for table sys_job
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[sys_job]
-- ----------------------------
ALTER TABLE [dbo].[sys_job] ADD PRIMARY KEY ([job_id])
GO

-- ----------------------------
-- Indexes structure for table sys_job_log
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[sys_job_log]
-- ----------------------------
ALTER TABLE [dbo].[sys_job_log] ADD PRIMARY KEY ([job_log_id])
GO

-- ----------------------------
-- Indexes structure for table sys_logininfor
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[sys_logininfor]
-- ----------------------------
ALTER TABLE [dbo].[sys_logininfor] ADD PRIMARY KEY ([info_id])
GO

-- ----------------------------
-- Indexes structure for table sys_menu
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[sys_menu]
-- ----------------------------
ALTER TABLE [dbo].[sys_menu] ADD PRIMARY KEY ([menu_id])
GO

-- ----------------------------
-- Indexes structure for table sys_notice
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[sys_notice]
-- ----------------------------
ALTER TABLE [dbo].[sys_notice] ADD PRIMARY KEY ([notice_id])
GO

-- ----------------------------
-- Indexes structure for table sys_oper_log
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[sys_oper_log]
-- ----------------------------
ALTER TABLE [dbo].[sys_oper_log] ADD PRIMARY KEY ([oper_id])
GO

-- ----------------------------
-- Indexes structure for table sys_post
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[sys_post]
-- ----------------------------
ALTER TABLE [dbo].[sys_post] ADD PRIMARY KEY ([post_id])
GO

-- ----------------------------
-- Indexes structure for table sys_role
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[sys_role]
-- ----------------------------
ALTER TABLE [dbo].[sys_role] ADD PRIMARY KEY ([role_id])
GO

-- ----------------------------
-- Indexes structure for table sys_role_dept
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[sys_role_dept]
-- ----------------------------
ALTER TABLE [dbo].[sys_role_dept] ADD PRIMARY KEY ([role_id], [dept_id])
GO

-- ----------------------------
-- Indexes structure for table sys_role_menu
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[sys_role_menu]
-- ----------------------------
ALTER TABLE [dbo].[sys_role_menu] ADD PRIMARY KEY ([role_id], [menu_id])
GO

-- ----------------------------
-- Indexes structure for table sys_user
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[sys_user]
-- ----------------------------
ALTER TABLE [dbo].[sys_user] ADD PRIMARY KEY ([user_id])
GO

-- ----------------------------
-- Indexes structure for table sys_user_online
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[sys_user_online]
-- ----------------------------
ALTER TABLE [dbo].[sys_user_online] ADD PRIMARY KEY ([sessionId])
GO

-- ----------------------------
-- Indexes structure for table sys_user_post
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[sys_user_post]
-- ----------------------------
ALTER TABLE [dbo].[sys_user_post] ADD PRIMARY KEY ([user_id], [post_id])
GO

-- ----------------------------
-- Indexes structure for table sys_user_role
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[sys_user_role]
-- ----------------------------
ALTER TABLE [dbo].[sys_user_role] ADD PRIMARY KEY ([user_id], [role_id])
GO

-- ----------------------------
-- Indexes structure for table zl_xzdept
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[zl_xzdept]
-- ----------------------------
ALTER TABLE [dbo].[zl_xzdept] ADD PRIMARY KEY ([xzdept_id])
GO
